/* 쌀먹냥 사이트 공통 스타일 (2026-11-30 디자인팀 시안에서)
   색·글꼴은 인스타 카드뉴스(cardnews/template.html)의 토큰을 그대로 옮겼다.
   달라진 것: 빨강은 흰 글자 대비 때문에 4%p 어둡게, 작은 주황 글자용 --orange-ink 추가,
   광고 구역만 쓰는 차가운 회색 3개 추가. */
:root {
  color-scheme: light;
  --paper: hsl(40, 30%, 99%);
  --soft: hsl(40, 30%, 94%);
  --soft-2: hsl(40, 24%, 90%);
  --line: hsl(40, 14%, 85%);
  --ink: hsl(220, 15%, 10%);
  --ink-2: hsl(220, 10%, 24%);
  --gray: hsl(220, 8%, 40%);
  --marker: hsl(52, 100%, 62%);
  --orange: hsl(18, 95%, 52%);
  --orange-ink: hsl(18, 90%, 38%);
  --red: hsl(4, 76%, 45%);
  --on-ink: hsl(40, 30%, 99%);
  --on-ink-2: hsl(40, 12%, 74%);
  --ad-bg: hsl(220, 14%, 96%);
  --ad-line: hsl(220, 10%, 80%);
  --ad-text: hsl(220, 8%, 38%);
  --font: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
  --r-s: 8px;
  --r-l: 16px;
  --hard: 3px 3px 0 var(--ink);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
ul, ol { list-style: none; }
::selection { background: var(--marker); color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: 16px; top: -48px; background: var(--ink); color: var(--on-ink); padding: 8px 12px; border-radius: var(--r-s); z-index: 2; }
.skip:focus { top: 8px; }

/* 머리 */
.top { padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.logo img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; }
.nav { display: flex; gap: 4px; margin-left: -8px; }
.nav a { display: block; padding: 8px; font-size: 16px; font-weight: 700; color: var(--ink-2); text-decoration: none; border-radius: var(--r-s); }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"] { color: var(--ink); background: linear-gradient(transparent 60%, var(--marker) 60%, var(--marker) 92%, transparent 92%); border-radius: 0; }
@media (max-width: 559px) { .nav { width: 100%; } }

/* 형광펜: 제목 안 한 구절에만 */
.mk { background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); padding: 0 4px; margin: 0 -2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* 날짜 알약: 카드뉴스 표지의 검은 알약 */
.pill { display: inline-block; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

/* 마감 딱지. 오늘·내일만 빨강(.hot), 나머지는 흰 바탕 */
.due { display: inline-block; flex-shrink: 0; font-size: 14px; font-weight: 800; line-height: 1.4; padding: 4px 12px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r-s); box-shadow: var(--hard); transform: rotate(3deg); }
.due.hot { background: var(--red); color: var(--on-ink); }

/* 티켓: 금액 칸. 검정 바탕 + 좌우 반원 홈 + 점선 */
.ticket-wrap { position: relative; padding-top: 24px; }
.ticket {
  position: relative; min-height: 112px; display: flex; flex-direction: column; justify-content: center;
  padding: 16px 24px 16px 128px; background: var(--ink); color: var(--on-ink); border-radius: var(--r-l);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 12px, #000 12.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 12px, #000 12.5px) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 50%, transparent 12px, #000 12.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 12px, #000 12.5px) right / 51% 100% no-repeat;
}
.ticket::before { content: ""; position: absolute; left: 112px; top: 16px; bottom: 16px; border-left: 2px dashed hsl(40 30% 99% / 0.35); }
.ticket b { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }
@media (max-width: 359px) { .ticket { padding-left: 112px; padding-right: 16px; } .ticket::before { left: 100px; } .ticket b { font-size: 24px; } .ticket-wrap .cat { width: 72px; height: 72px; bottom: 17px; } }
.ticket span { font-size: 14px; font-weight: 700; color: var(--marker); }
.ticket-wrap .cat { position: absolute; z-index: 1; left: 12px; bottom: 11px; width: 84px; height: 84px; object-fit: cover; border: 3px solid var(--on-ink); border-radius: 12px; transform: rotate(-4deg); pointer-events: none; }
/* 쌀먹냥 사진(실사)은 오려 얹지 않고 테두리 액자에 넣는다 */
.ph, .hero .writer, .hero .gang, .intro .clock, .writer-box img, .foot .cats { object-fit: cover; border: 2px solid var(--ink); border-radius: var(--r-l); box-shadow: var(--hard); }

/* 버튼: 쪽마다 진한 버튼은 응모 하나뿐 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; font: inherit; font-size: 16px; font-weight: 800; border-radius: var(--r-s); text-decoration: none; cursor: pointer; transition: background-color 120ms ease-out, transform 120ms ease-out; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-apply { width: 100%; background: var(--ink); color: var(--on-ink); border: 2px solid var(--ink); box-shadow: 0 1px 2px hsl(220 15% 10% / 0.2); }
.btn-apply:hover { background: var(--ink-2); }
.btn-apply:active { transform: translateY(1px); }
.btn-line { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }
.btn-line:hover { background: var(--soft); }
.link { font-weight: 700; color: var(--ink); text-decoration: underline; }
.link:hover { text-decoration-thickness: 2px; }

/* 목록 한 줄 */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 20px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color 120ms ease-out; }
.row:hover { background: var(--soft); }
.row:hover .chev { transform: translateX(2px); }
.row h3 { font-size: 16px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .meta { font-size: 14px; color: var(--gray); line-height: 1.5; margin-top: 4px; }
.row .odds { color: var(--orange-ink); font-weight: 700; }
.chev { width: 20px; height: 20px; color: var(--gray); transition: transform 120ms ease-out; }
.stub {
  height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--ink); color: var(--on-ink); border-radius: var(--r-s);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 6px, #000 6.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 6px, #000 6.5px) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 50%, transparent 6px, #000 6.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 6px, #000 6.5px) right / 51% 100% no-repeat;
}
.stub b { font-size: 16px; font-weight: 800; line-height: 1.2; }
.stub span { font-size: 12px; font-weight: 700; color: var(--marker); line-height: 1.3; }

/* 광고 구역: 차가운 회색 + "광고" 표기. 브랜드 요소(검정·형광펜·딱지·고양이)는 이 안과 옆에 두지 않는다 */
.ad { margin: 48px 0; padding: 8px 12px 12px; background: var(--ad-bg); border-radius: var(--r-s); }
.ad-label { display: block; font-size: 12px; color: var(--ad-text); margin-bottom: 8px; }
.ad-slot { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 250px; border: 1px dashed var(--ad-line); border-radius: 4px; font-size: 12px; color: var(--ad-text); padding: 16px; }

/* 꼬리 */
.foot { margin-top: 96px; padding: 48px 0 64px; background: var(--soft); }
.foot .wrap { display: grid; gap: 24px; }
.foot .cats { width: 120px; height: 120px; transform: rotate(-3deg); }
.foot p { font-size: 14px; color: var(--ink-2); max-width: 40em; }
.foot ul { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.foot ul a { display: inline-block; padding: 8px 0; color: var(--ink-2); }
.foot small { font-size: 12px; color: var(--gray); }
@media (min-width: 768px) {
  .foot .wrap { grid-template-columns: 160px minmax(0, 1fr); align-items: start; gap: 32px; }
}

/* 시안 주석: 실제 사이트엔 없음 */
.note-mock { font-size: 12px; color: var(--ad-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 방문자 체크(응모함·패스). 상태는 이 기기 localStorage에만 있다 */
.rows > li { border-bottom: 1px solid var(--line); }
.rows > li > .row { border-bottom: 0; }
.rows > li > .marks { padding: 0 0 12px 84px; margin-top: -4px; }
.marks { display: flex; gap: 8px; margin-top: 12px; }
.mk-btn { min-height: 36px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; transition: background-color 120ms ease-out, color 120ms ease-out; }
.mk-btn:hover { border-color: var(--gray); }
.mk-btn[data-mark="done"][aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.mk-btn[data-mark="skip"][aria-pressed="true"] { background: var(--soft-2); color: var(--ink); border-color: var(--soft-2); }
.is-skip > .row, .is-skip > .marks { opacity: 0.55; }
.is-done > .row h3::before { content: "응모함 "; color: var(--orange-ink); font-weight: 800; }
.mine { margin-top: 12px; font-size: 14px; color: var(--gray); }
.mine [data-count-done] { font-weight: 800; color: var(--ink); }
.ev-mark { margin-top: 24px; padding: 16px; background: var(--soft); border-radius: var(--r-s); }
.ev-mark p { font-size: 14px; color: var(--ink-2); }
#my-list .day { margin-top: 32px; }
#my-list h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 12px; }
.empty-my { margin-top: 24px; color: var(--gray); }
#my-list .row { grid-template-columns: minmax(0, 1fr); }
#my-list .rows > li > .marks { padding-left: 0; }
