/* Meme or Not 스타일 — 이 파일이 디자인 정본이다(2026-10-11 시안 A '검은 스티커' 이식).
   위: 토큰(역할 이름) / 아래: 컴포넌트. 컴포넌트는 색·크기를 직접 쓰지 않고 토큰만 참조한다.
   폰트(Black Han Sans·Gaegu·Noto Sans KR)는 Layout의 Google Fonts <link>(display=swap).
   다크 단일 테마 — 라이트 미디어쿼리 없음. */
:root {
  color-scheme: dark;
  /* 표면 */
  --surface-page: #0c0d0e;   /* 샘플 #0c0d0e 검은 바탕 */
  --surface-panel: #ededef;  /* 샘플 #ededef 찢은 종이 */
  --surface-cell: #1f2020;   /* 샘플 #1f2020 탭 트랙 */
  --surface-chip: #fbfbfc;   /* 👎 알약 바탕 (종이보다 한 단 밝게 — 샘플 #ecebeb에서 명도↑) */

  /* 잉크 — 종이 위 */
  --ink: #0d0d0e;            /* 샘플 #0d0d0e */
  --ink-2: #3a3a3d;          /* 뜻 줄 */
  --micro: #56565b;          /* 종이 위 보조 링크·신고 */
  /* 잉크 — 검은 바탕 위 (고유) */
  --ink-inv: #fefefe;        /* 샘플 #fefefe 브랜드 흰 글자 */
  --micro-inv: #a3a4a6;      /* 샘플 #7f8081 → 대비 위해 명도↑ */

  --line: #86858a;           /* 👎 알약 테두리·구분선 (샘플 #d0cece → 비텍스트 3:1 위해 명도↓) */

  --key: #dafb48;            /* 샘플 #dafb48 형광 라임 — 선택 탭·추가 버튼 */
  --key-ink: #0c0d0e;
  --series: #fe89d0;         /* 샘플 #fe89d0 👍 알약 핑크 */
  --series-strong: #fd299d;  /* 샘플 #fd299d 눌린 👍 */
  --hand-on-paper: #c4127a;  /* 같은 핑크, 종이 위 대비 위해 명도↓ */

  /* 순위 뱃지 / 형광펜 (샘플) */
  --rank-1: #fd76c7; --hl-1: #fec5eb;
  --rank-2: #dafa4b; --hl-2: #effba9;
  --rank-3: #ce8ffc; --hl-3: #dac0fe;
  --rank-x: #c9c8cc; --hl-x: #dcdbe0;  /* 4위부터 형광펜 · 👍−👎 음수 순위 원 */
  --tape: rgba(200, 200, 206, .55);

  /* 서체 */
  --font-display: "Black Han Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-body: "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-label: "Gaegu", "Nanum Pen Script", "Apple SD Gothic Neo", cursive;

  /* 크기 4단+ : display 44(72) / title 30(40) / word 26 / value 20 / body 15 / micro 13 / nano 12 */
  --fs-display: 38px;        /* 휴대폰 브랜드 — 섹션 제목(--fs-title)보다 한 단 크게 */
  --fs-display-lg: 72px;     /* 960+ 브랜드 */
  --fs-title: 30px;
  --fs-title-lg: 40px;       /* 960+ 섹션 제목 */
  --fs-word: 26px;           /* 2위 아래 단어·순위 숫자 */
  --fs-word-1: 36px;         /* 1위 단어 */
  --fs-word-1-lg: 48px;      /* 960+ 1위 단어 */
  --fs-rank-1: 32px;         /* 1위 순위 숫자 */
  --fs-h3: 24px;             /* 추가 폼 제목 */
  --fs-value: 20px;
  --fs-btn: 17px;            /* 큰 버튼 글자 */
  --fs-emoji: 18px;          /* 👍/👎 글리프 */
  --fs-input: 16px;          /* iOS 확대 방지 바닥 */
  --fs-hand: 17px;           /* 손글씨 메모 */
  --fs-body: 15px;
  --fs-micro: 13px;
  --fs-nano: 12px;
  --lh-tight: 1.1;
  --lh-body: 1.5;
  --fw-body: 400;
  --fw-strong: 700;
  --fw-black: 900;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --radius-tile: 4px;        /* 로봇 확인 칸·플레이어 */
  --radius-field: 12px;      /* 입력칸 */
  --radius-chip: 999px;
  --radius-btn: 999px;
  --row-h: 48px;
  --dur: 160ms;               /* 누름·색 바뀜 */
  --dur-in: 220ms;            /* 나타남(메뉴·메시지·미리보기) */
  --dur-move: 420ms;          /* 순위 자리 이동 — 눈으로 따라갈 만큼 (ms로만 — JS가 숫자로 읽는다) */
  --dur-pop: 360ms;           /* 표 들어간 버튼 튐·이모지 흔들림 */
  --dur-breathe: 1.2s;        /* 확인 중 깜빡임 한 번 */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --ease-pop: cubic-bezier(.3, 1.6, .5, 1);   /* 살짝 튀는 반동 — 표가 들어간 순간만 */

  /* 고유 */
  --border-btn: 1.5px;
  --shadow-strip: drop-shadow(0 5px 0 rgba(0, 0, 0, .4)) drop-shadow(0 12px 18px rgba(0, 0, 0, .5));  /* 종이 띠 filter */
  --shadow-strip-sm: drop-shadow(0 5px 0 rgba(0, 0, 0, .4));
  --scrim: rgba(12, 13, 14, .82);           /* 썸네일 위 「▶ 미리보기」 바탕 */
  --crease-dark: rgba(0, 0, 0, .035);       /* 종이 구김 */
  --crease-light: rgba(255, 255, 255, .6);
  --focus-ring: 0 0 0 7px var(--key);       /* 종이 위 포커스 바깥 라임 링 (안쪽은 key-ink outline) */
}

button, input, select, textarea { font: inherit; color: inherit; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--ink-inv);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
}
html, body { overflow-x: clip; }

/* ══ 컴포넌트 — 색·크기는 위 토큰만 참조 ══ */
a { color: inherit; }

/* ── 레이아웃 ─────────────────────────────── */
.wrap { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 var(--sp-4) var(--sp-6); }
.body { position: relative; }
/* 장식: 클릭 통과·스크린리더 숨김(aria-hidden은 마크업)·콘텐츠 아래. 빼도 레이아웃 그대로 */
.deco, .doodle { position: absolute; pointer-events: none; user-select: none; z-index: 0; }
.deco img { display: block; width: 100%; height: auto; }
.side-d { display: none; }

/* ── 헤더 ─────────────────────────────────── */
.top { position: relative; text-align: center; padding: 34px 0 var(--sp-4); z-index: 1; }
.top > :not(.deco):not(.doodle) { position: relative; z-index: 2; }
.d-cat   { left: -38px; top: 66px; width: 112px; transform: rotate(-4deg); }
.d-bunny { right: -30px; top: 40px; width: 100px; transform: rotate(6deg); }
.bubble { font-family: var(--font-label); font-weight: var(--fw-strong); line-height: 1.05; font-size: var(--fs-body);
  color: var(--key-ink); padding: var(--sp-2) var(--sp-3); border-radius: 18px; text-align: center; }
.bubble::after { content: ""; position: absolute; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); }
.b-lime { left: -6px; top: 8px; background: var(--key); transform: rotate(-6deg); }
.b-lime::after { left: 26px; bottom: -6px; }
.b-pink { display: none; background: var(--series); transform: rotate(8deg); }
.b-pink::after { left: 14px; top: -6px; }
.dd-1 { left: 42%; top: 4px; }
.dd-2 { right: 28%; top: 10px; }

.brand { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display);
  line-height: var(--lh-tight); letter-spacing: -.01em; color: var(--ink-inv); text-shadow: 0 3px 0 var(--surface-page); }
/* 브랜드(Meme or Not)는 두 언어 모두 영문 — 좁은 폭에선 양옆 고양이·토끼와 겹치지 않게 title 크기, 960+에서 display-lg */
.top:lang(en) .b-lime { display: none; } /* 영문 말풍선은 좁은 폭에서 브랜드와 겹친다 — 960+에서만 */
.brand .k { color: var(--key); }
.brand .p { color: var(--series); }
.sub { margin: 6px 0 0; font-weight: var(--fw-strong); color: var(--ink-inv); }

/* 나라 토글 + 탭 밖 오른쪽 끝 언어 전환 */
.nav { display: flex; justify-content: center; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.seg { display: inline-grid; grid-template-columns: 76px 76px; padding: 3px;
  border-radius: var(--radius-chip); background: var(--surface-cell); }
.seg a { display: grid; place-items: center; min-height: 44px; border-radius: var(--radius-chip);
  color: var(--ink-inv); text-decoration: none; font-weight: var(--fw-strong); }
.seg a[aria-current="page"] { background: var(--key); color: var(--key-ink); }
.lang { display: inline-grid; place-items: center; min-height: 44px; min-width: 44px; padding: 0 var(--sp-1);
  color: var(--micro-inv); font-size: var(--fs-micro); text-decoration: none; }

/* ── 섹션 제목 + 안내 ─────────────────────── */
.head { position: relative; margin: var(--sp-5) 0 var(--sp-4); }
.head > :not(.deco) { position: relative; z-index: 1; }
.head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-title); line-height: 1.25; color: var(--key-ink); }
.head h2 span { background: var(--key); padding: 0 var(--sp-2); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.howto { margin: var(--sp-2) 0 0; padding-right: 96px; word-break: keep-all; font-size: var(--fs-micro); line-height: 1.55; color: var(--micro-inv); }
.howto b { display: block; font-size: var(--fs-body); color: var(--ink-inv); margin-bottom: 2px; }
.d-cam { right: -22px; top: 34px; width: 104px; transform: rotate(10deg); }

/* ── 종이 판 (목록 띠·추가 폼 공통) ─────── */
.paper {
  --hl: var(--hl-x); --badge: var(--rank-x);
  position: relative; color: var(--ink); padding: 18px 14px 16px;
  background-color: var(--surface-panel);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(112deg, transparent 38%, var(--crease-dark) 39%, transparent 41%),
    linear-gradient(71deg, transparent 63%, var(--crease-light) 64%, transparent 66%),
    radial-gradient(120% 90% at 20% 0%, var(--surface-chip), transparent 60%);
  clip-path: polygon(0 5px, 4% 1px, 8% 6px, 13% 2px, 19% 5px, 24% 0, 30% 6px, 36% 2px, 42% 5px, 49% 0, 55% 4px, 61% 1px, 67% 6px, 73% 2px, 79% 5px, 85% 0, 91% 4px, 96% 1px, 100% 5px,
    100% calc(100% - 4px), 95% 100%, 90% calc(100% - 6px), 84% calc(100% - 1px), 78% calc(100% - 5px), 71% 100%, 65% calc(100% - 4px), 58% calc(100% - 1px), 52% calc(100% - 6px), 45% 100%, 39% calc(100% - 3px), 33% calc(100% - 6px), 26% 100%, 20% calc(100% - 4px), 13% calc(100% - 1px), 7% calc(100% - 6px), 0 calc(100% - 2px));
}
.item:nth-child(even) .paper {
  clip-path: polygon(0 2px, 6% 6px, 11% 0, 17% 4px, 23% 1px, 29% 6px, 35% 0, 41% 4px, 48% 2px, 54% 6px, 60% 1px, 66% 4px, 72% 0, 78% 5px, 84% 1px, 90% 6px, 95% 2px, 100% 4px,
    100% calc(100% - 1px), 94% calc(100% - 6px), 88% 100%, 82% calc(100% - 3px), 76% calc(100% - 6px), 69% calc(100% - 1px), 62% calc(100% - 5px), 56% 100%, 49% calc(100% - 4px), 43% calc(100% - 1px), 37% calc(100% - 6px), 30% 100%, 23% calc(100% - 3px), 16% calc(100% - 6px), 9% 100%, 3% calc(100% - 4px), 0 100%);
}
/* 종이 위 포커스: 검정 링 + 바깥 라임 링 / 검은 바탕 위: 흰 링 */
.paper :focus-visible, .item .more :focus-visible { outline: 3px solid var(--key-ink); outline-offset: 2px; box-shadow: var(--focus-ring); }
.top :focus-visible, .foot :focus-visible, .page :focus-visible { outline: 3px solid var(--ink-inv); outline-offset: 3px; }

/* ── 순위 목록: 찢은 종이 띠 ─────────────── */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.item { position: relative; filter: var(--shadow-strip); }
/* 테이프 */
.item::before {
  content: ""; position: absolute; z-index: 2; pointer-events: none;
  left: -8px; top: -9px; width: 62px; height: 22px; background: var(--tape);
  transform: rotate(-24deg); backdrop-filter: blur(1px);
  clip-path: polygon(0 10%, 6% 0, 12% 12%, 18% 0, 82% 0, 88% 10%, 94% 0, 100% 8%, 100% 92%, 94% 100%, 88% 90%, 82% 100%, 18% 100%, 12% 88%, 6% 100%, 0 92%);
}
/* 낙서·손글씨 — 띠 위쪽 가장자리에 걸친다. 문구는 main의 --hand(i18n) */
.item::after { position: absolute; z-index: 3; pointer-events: none; }
.item:nth-child(6n+4)::after {
  top: -15px; right: 56px; padding: 2px 10px; border-radius: 4px; transform: rotate(4deg);
  font-family: var(--font-label); font-weight: var(--fw-strong); font-size: var(--fs-hand); line-height: 1.3; color: var(--key-ink); }
.item:nth-child(6n+4)::after { content: var(--hand) / ""; background: var(--series); }
.item:nth-child(4n+3)::after, .item:nth-child(4n+5)::after {
  content: ""; top: -16px; width: 30px; height: 30px; background: var(--key);
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.item:nth-child(4n+3)::after { right: 22%; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M17 2 7 17h8l-3 11 11-16h-8z' fill='none' stroke='black' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.item:nth-child(4n+5)::after { left: 34%; background: var(--series); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M13 2 16 10h8l-6 5 2 8-7-5-7 5 2-8-6-5h8z' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* 순위별 색 — 1~3위만 형광색, 4위부터 검정 원 하나, 👍−👎 음수면 회색 (색에 뜻이 있을 때만 바꾼다) */
.item:nth-child(1) .paper { --hl: var(--hl-1); --badge: var(--rank-1); }
.item:nth-child(2) .paper { --hl: var(--hl-2); --badge: var(--rank-2); }
.item:nth-child(3) .paper { --hl: var(--hl-3); --badge: var(--rank-3); }
.item:nth-child(n+4) .paper { --badge: var(--key-ink); --badge-ink: var(--ink-inv); }
.item.neg .paper { --hl: var(--hl-x); --badge: var(--rank-x); --badge-ink: var(--key-ink); }

.row1 { padding-right: 30px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; align-items: start; }
.rank { grid-row: 1 / span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--badge); font-family: var(--font-display); font-weight: 400; font-size: var(--fs-word); line-height: 1;
  color: var(--badge-ink, var(--key-ink)); transform: rotate(-8deg); }
.rank span { transform: skewX(-10deg); }
.word { margin: 4px 0 0; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-word); line-height: 1.15;
  overflow-wrap: anywhere; word-break: keep-all; }
.word span { background: linear-gradient(transparent 30%, var(--hl) 30% 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 4px; border-radius: 6px; }
.mean { grid-column: 2; margin: 6px 0 0; font-size: var(--fs-micro); line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; word-break: keep-all; }
.mean:empty { display: none; }

.row2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-1) 10px; align-items: end; margin-top: 10px; }
.votes { display: flex; flex-wrap: wrap; gap: 6px; } /* 320 쇼츠 칸(≈146px)에 세 자리 수 두 개가 안 들어가면 줄바꿈 — 종이 clip-path에 잘리지 않게 */
.vote { min-width: 64px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-btn); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-size: var(--fs-value); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; line-height: 1;
  border: var(--border-btn) solid var(--line); background: var(--surface-chip); color: var(--ink);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.vote .e { font-size: var(--fs-emoji); }
.vote.up { background: var(--series); border-color: var(--series); }
.vote.up[aria-pressed="true"] { background: var(--series-strong); border-color: var(--key-ink); color: var(--ink-inv); box-shadow: 0 3px 0 var(--key-ink); }
.vote.down[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ink-inv); box-shadow: 0 3px 0 var(--surface-page); }
.vote:active { transform: translateY(2px) scale(.97); }

/* 미리보기 칸: 링크 있는 모든 항목이 같은 16:9 칸(1440에서도 과대하지 않게 상한). 유튜브는 썸네일, 나머지는 플랫폼 아이콘 */
.pv { position: relative; display: grid; place-items: center; width: 100%; max-width: 480px; aspect-ratio: 16 / 9; margin: 10px 0 0;
  padding: 0; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; cursor: pointer;
  background: var(--surface-page); color: var(--ink-inv); }
/* 미리보기를 연 동안 원래 버튼은 hidden — .pv·.txt의 display가 hidden 속성을 이기지 않게 */
.pv[hidden], .txt[hidden] { display: none; }
.pv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pv span { position: absolute; left: 8px; bottom: 8px; padding: 4px 10px; border-radius: var(--radius-chip);
  background: var(--scrim); color: var(--ink-inv); font-size: var(--fs-micro); font-weight: var(--fw-strong); white-space: nowrap; }
/* 누르면 그 자리에 공식 플레이어: 가로 영상 16:9 / 세로 영상 9:16(높이 상한·가운데) / 게시물(X·스레드·인스타) 고정 높이 + 안에서 스크롤 */
.paper iframe { display: block; width: 100%; max-width: 480px; margin: 10px 0 0; border: 0; border-radius: var(--radius-tile); background: var(--surface-page); }
/* 열린 미리보기는 플랫폼과 무관하게 같은 세로 칸(2026-10-11 사용자 결정) — 가로 영상은 플레이어가 위아래를 검게 채운다 */
.paper iframe { height: min(520px, 70vh); }
.paper iframe.post { background: var(--surface-chip); }
/* 액션 줄: 레퍼런스 링크(또는 링크 붙이기) */
.links { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; }
.txt { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
  border: 0; background: none; cursor: pointer; white-space: nowrap;
  font-size: var(--fs-micro); font-weight: var(--fw-strong); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.links > .txt:first-child { padding-left: 0; justify-content: flex-start; }
/* 신고: 카드 오른쪽 위 구석 「⋯」 + 그 자리 메뉴. 종이 clip-path에 안 잘리게 .paper 밖(li 직속) */
.more { position: absolute; top: 4px; right: 2px; z-index: 4; }
.dots { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  color: var(--micro); font-size: var(--fs-value); font-weight: var(--fw-strong); line-height: 1; }
.dots[aria-expanded="true"] { color: var(--ink); background: var(--hl-x); }
.repmenu:not([hidden]) { position: absolute; top: 46px; right: 0; width: max-content; max-width: calc(100vw - 32px); display: grid; gap: var(--sp-1); padding: var(--sp-2);
  background: var(--surface-chip); border: var(--border-btn) solid var(--line); border-radius: var(--radius-field); filter: var(--shadow-strip-sm); }
.repmenu .txt { justify-content: flex-start; padding: 0 var(--sp-3); text-decoration: none; }
/* 메뉴를 연 줄은 다음 줄(뒤에 그려짐)보다 위로 — 아래로 펼친 메뉴가 가려지지 않게 */
.item:has(.repmenu:not([hidden])) { z-index: 5; }
.txt:active { opacity: .6; }
.ico { width: 1.15em; height: 1.15em; flex: none; margin-right: 4px; }

/* 1위는 크게 */
.item:first-child .paper { padding: 22px 16px 18px; }
.item:first-child .word { font-size: var(--fs-word-1); }
.item:first-child .rank { width: 52px; height: 52px; font-size: var(--fs-rank-1); }
.item:first-child .mean { font-size: var(--fs-body); }

/* 좁은 폭: 링크 줄과 투표 줄을 따로 */
@media (max-width: 420px) {
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .votes { justify-self: end; }
  /* 설명은 순위 원 아래부터 카드 폭으로 — 제목 들여쓰기에 맞추면 줄만 늘고 링크 줄과 왼쪽 선이 갈린다 */
  .rank { grid-row: 1; }
  .mean { grid-column: 1 / -1; }
}


/* ── 추가 폼 판 (로봇 확인·상태 줄 포함) ── */
.side { position: relative; z-index: 1; margin-top: var(--sp-6); }
.add { position: relative; filter: var(--shadow-strip-sm); }
.add .paper { padding: 22px 16px 18px; transform: rotate(.4deg); }
.add h3 { margin: 0 0 var(--sp-3); font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; }
.add h3 span { background: linear-gradient(transparent 35%, var(--hl-2) 35% 92%, transparent 92%); padding: 0 4px; }
.add input { display: block; width: 100%; box-sizing: border-box; min-height: var(--row-h); margin-bottom: var(--sp-2);
  padding: 0 14px; border: var(--border-btn) solid var(--line); border-radius: var(--radius-field); background: var(--surface-chip);
  font-size: var(--fs-input); color: var(--ink); }
.add input::placeholder { color: var(--micro); }
.add input:focus-visible { border-color: var(--key-ink); }
.cf-turnstile { max-width: 100%; margin: var(--sp-1) 0 var(--sp-2); }
#msg { margin: 0 0 var(--sp-2); font-size: var(--fs-micro); font-weight: var(--fw-strong); color: var(--hand-on-paper); }
#msg:empty { margin: 0; }
.btn { position: relative; min-height: 52px; width: 100%; border-radius: var(--radius-btn); border: 2px solid var(--key-ink); cursor: pointer;
  font-size: var(--fs-btn); font-weight: var(--fw-black); box-shadow: 0 4px 0 var(--key-ink); transition: transform var(--dur) var(--ease); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--key-ink); }
.btn-key { background: var(--key); color: var(--key-ink); }
#ad-slot { min-height: 100px; margin-top: var(--sp-5); }
#ad-slot:empty { display: none; }

/* ── 푸터 판: 순위 공유 + 계정 + 소개 ───── */
.foot { position: relative; z-index: 1; display: grid; justify-items: center; gap: var(--sp-3); margin-top: 56px;
  padding: var(--sp-5) var(--sp-4) var(--sp-2); border-radius: 20px; background: var(--surface-cell);
  font-size: var(--fs-micro); color: var(--micro-inv); }
.foot > :not(.deco) { position: relative; z-index: 1; }
.share { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--sp-4); cursor: pointer;
  border: var(--border-btn) solid var(--series); border-radius: var(--radius-chip); background: none;
  color: var(--series); font-size: var(--fs-micro); font-weight: var(--fw-strong); transition: transform var(--dur) var(--ease); }
.share:active { transform: translateY(2px); }
.sns { display: flex; gap: var(--sp-3); }
.sns a { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--key-ink); box-shadow: 0 3px 0 var(--surface-chip); color: var(--key-ink); transition: transform var(--dur) var(--ease); }
.sns a:first-child { background: var(--series); transform: rotate(-6deg); }
.sns a:last-child  { background: var(--key); transform: rotate(5deg); }
.sns a:active { transform: translateY(2px); }
.sns .ico { width: 24px; height: 24px; margin: 0; }
.foot nav { display: flex; align-items: center; gap: var(--sp-2); }
.foot nav a { color: var(--micro-inv); min-height: 44px; min-width: 44px; justify-content: center; display: inline-flex; align-items: center; padding: 0 4px; text-underline-offset: 3px; }
.d-heart { left: -22px; bottom: -36px; width: 76px; transform: rotate(-12deg); z-index: -1; }

/* ── 소개·개인정보처리방침: 검은 바탕 위 읽기 칸 ── */
.page { max-width: 680px; margin: 0 auto; padding: var(--sp-5) var(--sp-4) var(--sp-7); }
.page .back { display: inline-flex; align-items: center; min-height: 44px; color: var(--micro-inv); text-underline-offset: 3px; }
.page h1 { margin: var(--sp-4) 0; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-title); line-height: 1.25; }
.page p { color: var(--ink-inv); overflow-wrap: anywhere; word-break: keep-all; }
.page h2 { margin: var(--sp-5) 0 var(--sp-1); font-size: var(--fs-body); font-weight: var(--fw-strong); color: var(--ink-inv); }
.page h2 + p { margin-top: 0; }

/* ── 데스크톱: 가운데 한 열 + 양옆 장식 ── */
@media (min-width: 960px) {
  .wrap { padding: 0 var(--sp-7) 64px; }
  .top { padding-top: var(--sp-7); }
  .brand { font-size: var(--fs-display-lg); }
  .sub { font-size: var(--fs-btn); }
  .d-cat { left: 40px; top: 40px; width: 220px; }
  .d-bunny { right: 40px; top: 30px; width: 200px; }
  .bubble { font-size: var(--fs-h3); }
  .b-lime, .top:lang(en) .b-lime { display: block; left: 220px; top: 170px; } /* 긴 영문 로고와 안 겹치게 — b-pink와 좌우 대칭 */
  .b-pink { display: block; right: 220px; top: 170px; }
  .body, .foot { max-width: 760px; margin-left: auto; margin-right: auto; }
  .howto { padding-right: 0; }
  .head h2 { font-size: var(--fs-title-lg); }
  .d-cam { right: -170px; top: -10px; width: 140px; }
  .paper { padding: 20px 22px 18px; }
  .item:first-child .word { font-size: var(--fs-word-1-lg); }
  .d-heart { left: -64px; bottom: -40px; width: 100px; }
  .side-d { display: block; }
  .s1 { left: -130px; top: 520px; }
  .s2 { right: -120px; top: 980px; }
  .s3 { left: -170px; top: 1500px; } /* 목록 길이에 따라 추가 폼 옆에 오므로 폼 왼쪽 끝(하트)보다 바깥으로 */
  .s4 { right: -130px; top: 1900px; }
}
/* 960~1179(작은 노트북·태블릿 가로): 말풍선이 나라 탭·English를 덮고 고양이가 로고 M을 가리며, 카메라·옆 낙서는 화면 밖으로 잘린다
   → 이 폭에선 말풍선·카메라·옆 낙서를 빼고 고양이·토끼를 줄여 가장자리로 */
@media (min-width: 960px) and (max-width: 1179px) {
  .top .bubble, .top:lang(en) .bubble, .d-cam, .side-d { display: none; }
  .d-cat { left: 0; width: 150px; }
  .d-bunny { right: 0; width: 140px; }
}
/* 1180+: 말풍선(top 170 + 높이)·고양이 발끝이 섹션 제목에 닿지 않게 헤더 아래를 띄운다 */
@media (min-width: 1180px) { .top { padding-bottom: 72px; } }
/* 휴대폰 첫 화면은 고양이·토끼만 — 말풍선·카메라·낙서는 넓은 화면에서만 (첫 단어를 위로) */
@media (max-width: 959px) { .b-lime, .d-cam, .top .doodle { display: none; } .howto { padding-right: 0; } } /* 카메라가 숨으면 비워 둔 오른쪽 칸도 쓴다 */
@media (max-width: 374px) { .d-bunny { width: 84px; } } /* 360: 토끼 귀가 로고 「Not」에 닿지 않게 */
@media (max-width: 359px) { .d-cat { width: 80px; left: -44px; } .brand { font-size: var(--fs-title); } } /* 320: 고양이가 나라 탭 뒤로, 로고가 장식에 닿지 않게 */
/* ── 모션 (규칙: docs/motion.md) — 사용자가 한 일에만 움직인다. 15초 자동 갱신·처음 그리기엔 움직이지 않는다 ── */
@keyframes pop { 40% { transform: scale(1.18); } 100% { transform: none; } }
@keyframes wiggle { 30% { transform: rotate(-16deg) scale(1.2); } 60% { transform: rotate(10deg); } 100% { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
@keyframes fade { from { opacity: 0; } }
@keyframes breathe { 50% { opacity: .55; } }
/* 표: 누른 쪽 버튼이 튀고 이모지가 흔들린다(누르는 순간 JS가 .pop을 붙인다 — 서버 답을 기다리지 않음) */
.vote.pop { animation: pop var(--dur-pop) var(--ease-pop); }
.vote .e { display: inline-block; }
.vote.pop .e { animation: wiggle var(--dur-pop) var(--ease); }
.vote, .dots, .share, .seg a, .lang, .txt, .sns a { -webkit-tap-highlight-color: transparent; }
.dots { transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.dots:active { transform: scale(.9); }
.repmenu:not([hidden]) { transform-origin: top right; animation: drop var(--dur-in) var(--ease); }
.paper iframe { animation: fade var(--dur-in) var(--ease); }
.pv img { transition: transform var(--dur-in) var(--ease); }
.pv:active img { transform: scale(.98); }
.txt { transition: opacity var(--dur) var(--ease); }
.seg a, .lang { transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.seg a:active, .lang:active { transform: scale(.95); }
#msg.in { animation: rise var(--dur-in) var(--ease); }
.btn:disabled { cursor: progress; animation: breathe var(--dur-breathe) var(--ease) infinite; }   /* 확인 중 */
.add input { transition: border-color var(--dur) var(--ease); }
/* 마우스가 있는 화면만: 올리면 살짝 뜬다 */
@media (hover: hover) {
  /* translate는 transform과 따로 겹친다 — 누름(:active)·SNS 기울기를 덮지 않게 */
  .vote, .share, .sns a, .btn { transition-property: transform, translate, background-color, border-color; }
  .vote:hover:not(:disabled), .share:hover, .sns a:hover { translate: 0 -2px; }
  .btn:hover:not(:disabled) { translate: 0 -1px; }
  .txt:hover:not(:active) { opacity: .7; }
  .dots:hover { color: var(--ink); }
}
/* 언어 전환·소개·방침·약관(페이지 이동)은 겹쳐 넘어간다 — 지원 브라우저만. 나라 탭은 페이지 안에서 목록만 바꾼다 */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--dur-in); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}
