/* =========================================================
   ttpas studio — pastel crayon homepage
   ========================================================= */

:root {
  --ink: #5a3a28;
  --ink-soft: #8b6a55;
  --text: #6b4f3e;
  --paper: #fffaf0;
  --white: #fffdf9;

  /* 로고 글자색에서 뽑은 파스텔 팔레트 */
  --blue: #a3d5f7;   --blue-d: #5aaee8;   --blue-l: #e3f2fd;
  --pink: #fbb7c1;   --pink-d: #f08da0;   --pink-l: #ffe8ec;
  --yellow: #ffe08c; --yellow-d: #f6c23e; --yellow-l: #fff4d1;
  --green: #c3e9a2;  --green-d: #82cc63;  --green-l: #ebf8df;
  --purple: #dcc6f7; --purple-d: #b88ce6; --purple-l: #f3eafd;
  --orange: #fbb47c;
  --mint: #6cc79c;

  --r: 30px 38px 32px 36px / 36px 30px 38px 32px;
  --r-sm: 18px 22px 20px 24px / 22px 18px 24px 20px;

  --f-title: 'Jua', 'Fredoka', 'Malgun Gothic', sans-serif;
  --f-body: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --f-en: 'Fredoka', 'Jua', sans-serif;
  --f-hand: 'Gaegu', 'Jua', cursive;
  --w-title: 400;

  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --hatch: repeating-linear-gradient(-58deg, rgba(255, 255, 255, .42) 0 1.6px, transparent 1.6px 5.5px);
}

/* 언어별 폰트 (Jua/Gowun Dodum에는 일본어 글자가 없어요) */
html[lang="en"] {
  --f-title: 'Fredoka', 'Jua', sans-serif;
  --f-body: 'Nunito', 'Gowun Dodum', sans-serif;
  --w-title: 600;
}
html[lang="ja"] {
  --f-title: 'M PLUS Rounded 1c', 'Jua', sans-serif;
  --f-body: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Meiryo', sans-serif;
  --f-hand: 'Yusei Magic', 'Gaegu', sans-serif;
  --w-title: 800;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  /* 종이 결 */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .23  0 0 0 0 .16  .22 0 0 0 -.06'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}

/* 일본어는 띄어쓰기가 없어서 keep-all이면 줄바꿈이 안 돼요 */
html[lang="ja"] body {
  font-weight: 500;
  word-break: normal;
  word-break: auto-phrase;
  line-break: strict;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px dashed var(--blue-d); outline-offset: 5px; }

::selection { background: var(--yellow); color: var(--ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: min(1120px, 100% - 48px); margin-inline: auto; }

.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

h1, h2, h3 { font-weight: 400; }

/* ---------- crayon surface ---------- */
.crayon { position: relative; isolation: isolate; }
.crayon::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 3.5px solid var(--ink);
  border-radius: var(--r);
  background-color: var(--fill, var(--white));
  background-image: var(--hatch);
  box-shadow: 5px 7px 0 rgba(90, 58, 40, .1);
  filter: url(#crayon);
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px 13px;
  font-family: var(--f-title);
  font-size: 1.12rem;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .3s var(--bounce);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--fill, var(--yellow));
  background-image: var(--hatch);
  border: 3px solid var(--ink);
  border-radius: 26px 30px 24px 32px / 30px 24px 32px 26px;
  box-shadow: 0 5px 0 var(--ink);
  filter: url(#rough);
  transition: box-shadow .15s;
}
.btn .ico { width: 1.5em; height: 1.5em; --fill: var(--icon, var(--white)); }
.btn:hover { transform: translateY(-3px) rotate(-2deg); }
.btn:active { transform: translateY(3px); }
.btn:active::before { box-shadow: 0 2px 0 var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 240, .86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'><path d='M0 5Q15 1 30 5T60 5T90 5T120 5' fill='none' stroke='%235a3a28' stroke-width='2.4' stroke-linecap='round' opacity='.35'/></svg>") repeat-x center / 120px 10px;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.site-header.scrolled::after { opacity: 1; }

.nav-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand { display: flex; align-items: flex-end; gap: 2px; text-decoration: none; }
.brand img { height: 56px; width: auto; transition: transform .35s var(--bounce); }
.brand:hover img { transform: rotate(-4deg) scale(1.06); }
.brand-text {
  margin-bottom: 7px;
  font-family: var(--f-en);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .05em;
  color: var(--ink-soft);
}

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  padding: 5px 16px 4px;
  font-family: var(--f-title);
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  border: 2.5px solid transparent;
  border-radius: var(--r-sm);
  transition: background-color .2s, border-color .2s, transform .3s var(--bounce);
}
.site-nav a:hover,
.site-nav a.active {
  background-color: var(--c);
  border-color: var(--ink);
  transform: rotate(-3deg) translateY(-1px);
}
.site-nav a:nth-child(even):hover,
.site-nav a.active:nth-child(even) { transform: rotate(3deg) translateY(-1px); }

.nav-toggle { display: none; }

.header-right { display: flex; align-items: center; gap: 16px; }

/* 언어 선택: 국기 아이콘 (PC는 헤더 안, 모바일은 우측 하단 위젯) */
.lang-switch {
  padding-right: 16px;
  border-right: 2.5px dashed rgba(90, 58, 40, .3);
}
.lang-toggle { display: none; }
.lang-list { display: flex; gap: 9px; margin: 0; padding: 0; list-style: none; }
.lang-list a {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
}
.lang-list a[aria-current="page"] { box-shadow: 0 0 0 3px var(--yellow), 0 0 0 5.5px var(--ink); }
.flag {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: transform .3s var(--bounce);
}
.lang-list a:hover .flag,
.lang-list a:focus-visible .flag { transform: rotate(-14deg) scale(1.14); }
.lang-name {
  position: absolute;
  top: calc(100% + 11px);
  left: 50%;
  padding: 2px 10px 1px;
  font-family: var(--f-body);
  font-size: .82rem;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px) scale(.7);
  transform-origin: 50% 0;
  transition: opacity .2s, transform .3s var(--bounce);
}
.lang-list a:hover .lang-name,
.lang-list a:focus-visible .lang-name { opacity: 1; transform: translate(-50%, 0); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 30px 0 140px;
  text-align: center;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }

.hero-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin: 0 auto 6px;
  padding: 5px 18px 4px 10px;
  font-family: var(--f-title);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(90, 58, 40, .12);
}
.hero-badge .ico { width: 1.6em; height: 1.6em; }

.hero-logo { position: relative; display: inline-block; margin: 0; line-height: 0; }
.hero-logo img {
  width: min(620px, 90vw);
  cursor: pointer;
  transform-origin: 50% 85%;
  animation: float 5.5s ease-in-out infinite;
  -webkit-user-drag: none;
  user-select: none;
}
.hero-logo img.boing { animation: boing .7s var(--bounce), float 5.5s ease-in-out .7s infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-.8deg); }
  50%      { transform: translateY(-10px) rotate(.8deg); }
}
@keyframes boing {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.08, .9); }
  55%  { transform: scale(.95, 1.06); }
  75%  { transform: scale(1.03, .98); }
  100% { transform: scale(1); }
}

.nyang {
  position: absolute;
  left: 60%;
  top: 4%;
  padding: 6px 16px 4px;
  font-family: var(--f-hand);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 20px 22px 22px 4px;
  box-shadow: 0 4px 0 rgba(90, 58, 40, .15);
  transform: scale(0) rotate(8deg);
  transform-origin: 0 100%;
  transition: transform .35s var(--bounce);
  pointer-events: none;
}
.nyang.show { transform: scale(1) rotate(8deg); }

.hero-title {
  margin: 4px 0 14px;
  font-family: var(--f-title);
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.42;
  color: var(--ink);
}
html[lang="ja"] .hero-title { font-size: clamp(1.6rem, 4.4vw, 2.9rem); }
.nw { white-space: nowrap; }
.hl {
  position: relative;
  z-index: 0;
  padding: 0 .12em;
  color: inherit;
  background: none;
  white-space: nowrap;
}
.hl::before {
  content: "";
  position: absolute;
  left: -.04em; right: -.04em; bottom: .1em;
  height: .46em;
  z-index: -1;
  background-color: var(--c);
  background-image: var(--hatch);
  border-radius: 6px 12px 8px 14px;
  transform: rotate(-1.5deg);
  filter: url(#crayon);
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 30px;
  font-size: 1.08rem;
}

.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* decorations */
.hero-deco { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.deco {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  overflow: visible;
  transform: rotate(var(--rot));
  animation: bob 6s ease-in-out var(--dl) infinite;
  transition: translate .6s ease-out;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--rot)); }
  50%      { transform: translateY(-14px) rotate(calc(var(--rot) + 10deg)); }
}

.dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
  border: 2.5px solid var(--ink);
  opacity: .7;
}

.shooting-star {
  position: absolute;
  top: 10%;
  left: 0;
  width: 46px;
  height: 46px;
  opacity: 0;
  animation: shoot 11s ease-in-out 2s infinite;
}
.shooting-star svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  --fill: var(--yellow);
  animation: spin 1.4s linear infinite;
}
.shooting-star::before,
.shooting-star::after {
  content: "";
  position: absolute;
  right: 45%;
  border-radius: 6px;
  background: linear-gradient(to left, var(--blue-d), rgba(90, 174, 232, 0));
  filter: url(#rough);
}
.shooting-star::before { top: 13px; width: 180px; height: 5px; }
.shooting-star::after  { top: 27px; width: 120px; height: 4px; opacity: .65; }

@keyframes shoot {
  0%   { transform: translate(-20vw, 70px) rotate(-9deg); opacity: 0; }
  3%   { opacity: 1; }
  21%  { opacity: 1; }
  25%  { transform: translate(115vw, -40px) rotate(-9deg); opacity: 0; }
  100% { transform: translate(115vw, -40px) rotate(-9deg); opacity: 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* grass strip (로고 아래 풀밭) */
.grass {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 58px;
  z-index: 1;
  pointer-events: none;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='44' viewBox='0 0 84 44'><path d='M1 41L5 19L9 41L13 12L17 41L21 21L25 41L29 9L33 41L37 18L41 41L45 13L49 41L53 22L57 41L61 10L65 41L69 17L73 41L77 13L81 41L84 24' fill='none' stroke='%23b8df8f' stroke-width='3.6' stroke-linejoin='round' stroke-linecap='round'/></svg>") repeat-x left 0 bottom 0 / 84px 44px,
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='40' viewBox='0 0 96 40'><path d='M2 38L7 14L12 38L17 20L22 38L27 8L32 38L37 16L42 38L47 22L52 38L57 11L62 38L67 18L72 38L77 9L82 38L87 19L92 38L96 15' fill='none' stroke='%23d9f0bd' stroke-width='3.4' stroke-linejoin='round' stroke-linecap='round'/></svg>") repeat-x left 37px bottom 6px / 96px 40px;
  filter: url(#rough);
}

/* ---------- sections ---------- */
.section { position: relative; padding: 110px 0; }

.section-head { margin-bottom: 56px; text-align: center; }
.section-head h2,
.contact-text h2 {
  margin: 12px 0 4px;
  font-family: var(--f-title);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.3;
  color: var(--ink);
}
.section-head p { margin: 0; color: var(--ink-soft); }

.eyebrow {
  display: inline-block;
  padding: 3px 16px 1px;
  font-family: var(--f-en);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--c);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  transform: rotate(-3deg);
}

/* reveal on scroll (JS가 켜져 있을 때만 숨김) */
.js .reveal:not(.in) { opacity: 0; }
.reveal.in { animation: pop-in .8s var(--bounce) var(--delay, 0s) both; }
@keyframes pop-in {
  from { opacity: 0; translate: 0 36px; }
  to   { opacity: 1; translate: 0 0; }
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 70px;
  align-items: center;
}

.about-photo { margin: 0; padding: 22px; transform: rotate(-3deg); }
.about-photo img { width: 100%; border-radius: 22px; }

.speech {
  position: absolute;
  top: -20px;
  right: -26px;
  padding: 6px 16px 3px;
  font-family: var(--f-hand);
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 22px 22px 22px 4px;
  box-shadow: 0 4px 0 rgba(90, 58, 40, .15);
  animation: wiggle 3s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(8deg); }
  50%      { transform: rotate(2deg) translateY(-4px); }
}

.lead {
  margin: 0 0 16px;
  font-family: var(--f-title);
  font-size: 1.5rem;
  line-height: 1.55;
  color: var(--ink);
}
.about-text p { margin-top: 0; }
html[lang="en"] .lead, html[lang="ja"] .lead { font-size: 1.3rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px 2px;
  font-family: var(--f-title);
  color: var(--ink);
  background: var(--c);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-sm);
  transform: rotate(-2deg);
  transition: transform .3s var(--bounce);
}
.chips li:nth-child(even) { transform: rotate(2deg); }
.chips li:hover { transform: rotate(0) scale(1.08); }
.chips .ico { --fill: var(--white); width: 1.3em; height: 1.3em; }

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 96px;
}
.value-card {
  padding: 34px 28px 32px;
  text-align: center;
  transform: rotate(-1.5deg);
  transition: transform .35s var(--bounce);
}
.value-card:nth-child(2) { transform: rotate(1deg); }
.value-card:nth-child(3) { transform: rotate(-.5deg); }
.value-card:hover { transform: translateY(-8px) rotate(0); }

.value-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 14px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
}
.value-icon svg { width: 54px; height: 54px; overflow: visible; }
.value-card h3 {
  margin: 0 0 6px;
  font-family: var(--f-title);
  font-size: 1.45rem;
  color: var(--ink);
}
.value-card p { margin: 0; }

/* ---------- games ---------- */
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.game-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 28px;
  transition: transform .35s var(--bounce);
}
.game-card:hover { transform: translateY(-8px) rotate(-1deg); }
.game-card:nth-child(even):hover { transform: translateY(-8px) rotate(1deg); }

.game-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 11;
}
.game-thumb::before {
  border-width: 3px;
  border-radius: 22px 26px 20px 28px / 26px 20px 28px 22px;
  box-shadow: none;
}
.game-thumb::after {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .75) 2.6px, transparent 3.2px);
  background-size: 24px 24px;
  opacity: .55;
}
.game-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }

.thumb-icon {
  width: 40%;
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
  animation: bob-small 4s ease-in-out infinite;
}
.thumb-q {
  font-family: var(--f-en);
  font-weight: 700;
  font-size: 6.4rem;
  line-height: 1;
  color: var(--white);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  animation: bob-small 4s ease-in-out infinite;
}
@keyframes bob-small {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-8px) rotate(4deg); }
}

.stamp {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 2px 10px 0;
  font-family: var(--f-en);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--ink);
  background: rgba(255, 253, 249, .88);
  border: 2px dashed var(--ink);
  border-radius: 8px;
  transform: rotate(-6deg);
}

.game-body { display: flex; flex-direction: column; flex: 1; padding: 20px 8px 0; }
.game-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 13px 0;
  font-family: var(--f-title);
  font-size: .95rem;
  color: var(--ink);
  background: var(--c);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
}
.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-d);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(130, 204, 99, .8); }
  70%  { box-shadow: 0 0 0 8px rgba(130, 204, 99, 0); }
  100% { box-shadow: 0 0 0 0 rgba(130, 204, 99, 0); }
}
.code { font-family: var(--f-en); font-weight: 600; font-size: .92rem; color: var(--ink-soft); }

.game-body h3 { margin: 4px 0 6px; font-family: var(--f-title); font-size: 1.5rem; color: var(--ink); }
.game-body p { margin: 0; }

.progress {
  height: 16px;
  margin-top: auto;
  overflow: hidden;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
}
.game-body p + .progress { margin-top: 20px; }
.progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, var(--pink) 25%, var(--yellow) 25% 50%, var(--pink) 50% 75%, var(--yellow) 75%);
  background-size: 24px 24px;
  animation: stripes 1s linear infinite;
}
@keyframes stripes { to { background-position: 24px 0; } }

/* ---------- news ---------- */
.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.note { padding: 38px 28px 28px; transform: rotate(-2deg); }
.note:nth-child(2) { transform: rotate(1.5deg); }
.note:nth-child(3) { transform: rotate(-.8deg); }
.note::before { border-radius: 10px 14px 12px 16px / 14px 10px 16px 12px; }

.tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 100px;
  height: 28px;
  translate: -50% 0;
  rotate: -4deg;
  background-color: var(--c);
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 2px, transparent 2px 6px);
  opacity: .8;
  clip-path: polygon(3% 0, 97% 5%, 100% 50%, 97% 100%, 2% 95%, 0 50%);
}

.note time { font-family: var(--f-en); font-weight: 600; font-size: .95rem; color: var(--ink-soft); }
.note h3 { margin: 2px 0 8px; font-family: var(--f-title); font-size: 1.38rem; line-height: 1.4; color: var(--ink); }
.note p { margin: 0; }
.tag {
  display: inline-block;
  margin-top: 16px;
  padding: 1px 12px 0;
  font-family: var(--f-title);
  font-size: .9rem;
  color: var(--ink);
  background: var(--c);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.note-empty {
  padding: 40px 28px 36px;
  text-align: center;
  color: var(--ink-soft);
  border: 3px dashed rgba(90, 58, 40, .35);
  border-radius: var(--r);
}
.note-empty h3 { color: var(--ink-soft); }
.ico-lg { width: 58px; height: 58px; --fill: var(--purple-d); }

/* ---------- contact ---------- */
.contact { padding-top: 150px; }

.contact-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 60px 60px;
}
.contact-card::before { border-width: 4px; }
.contact-text p { margin: 0 0 28px; }
.contact-text .mail-addr { margin: 16px 0 0; font-family: var(--f-en); font-weight: 500; }
.mail-addr a {
  color: var(--ink-soft);
  text-decoration: underline wavy var(--pink-d);
  text-underline-offset: 5px;
  transition: color .2s;
}
.mail-addr a:hover { color: var(--ink); }

.peek {
  position: absolute;
  top: -82px;
  right: 80px;
  width: 116px;
  height: 90px;
}
.peek-cat {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -2;
  width: 116px;
  height: 116px;
  overflow: visible;
  animation: peek 4.5s ease-in-out infinite;
}
@keyframes peek {
  0%, 60%, 100% { transform: translateY(0); }
  75%           { transform: translateY(14px); }
}
.peek-paw {
  position: absolute;
  top: 70px;
  z-index: 1;
  width: 32px;
  height: 24px;
  background:
    radial-gradient(circle at 30% 70%, var(--pink) 0 3px, transparent 3.5px),
    radial-gradient(circle at 50% 60%, var(--pink) 0 3px, transparent 3.5px),
    radial-gradient(circle at 70% 70%, var(--pink) 0 3px, transparent 3.5px),
    var(--white);
  border: 3px solid var(--ink);
  border-radius: 50% 50% 42% 42% / 60% 60% 40% 40%;
}
.peek-paw.l { left: 10px; }
.peek-paw.r { right: 10px; }

.socials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.socials a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-family: var(--f-en);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .3s var(--bounce), background-color .2s, box-shadow .15s;
}
.socials a svg { flex: none; width: 34px; height: 34px; overflow: visible; --fill: var(--c); }
.socials a:hover { background: var(--c); transform: translateY(-3px) rotate(-2deg); }
.socials li:nth-child(even) a:hover { transform: translateY(-3px) rotate(2deg); }
.socials a:hover svg { --fill: var(--white); }
.socials a:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- footer ---------- */
.site-footer { position: relative; padding: 96px 0 44px; text-align: center; }
.grass-footer { top: 0; bottom: auto; }
.footer-inner img { width: 128px; margin: 0 auto 6px; }
.made { margin: 0; font-family: var(--f-hand); font-size: 1.4rem; color: var(--ink); }
.made .ico { --fill: var(--pink); }
.copy { margin: 2px 0 0; font-family: var(--f-en); font-size: .9rem; color: var(--ink-soft); }

/* ---------- back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 66px;
  height: 66px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(.8);
  transition: opacity .3s, transform .4s var(--bounce), visibility .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 4px 0 rgba(90, 58, 40, .2));
  transition: transform .3s var(--bounce);
}
.to-top:hover svg { transform: rotate(-10deg) translateY(-4px); }
.to-top-label {
  position: absolute;
  right: 72%;
  bottom: 86%;
  padding: 2px 10px 0;
  font-family: var(--f-hand);
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 14px 14px 4px 14px;
  opacity: 0;
  transform: scale(.6);
  transform-origin: 100% 100%;
  transition: opacity .2s, transform .3s var(--bounce);
}
.to-top:hover .to-top-label,
.to-top:focus-visible .to-top-label { opacity: 1; transform: none; }

/* click sparkles */
.burst { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; overflow: visible; }

/* 제목용 폰트 굵기 (언어별 --w-title) */
.btn, .site-nav a, .hero-badge, .hero-title, .section-head h2, .contact-text h2,
.lead, .chips li, .value-card h3, .status, .game-body h3, .note h3, .tag {
  font-weight: var(--w-title);
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .game-grid, .notes { grid-template-columns: repeat(2, 1fr); }
  .values { gap: 20px; }
  .value-card { padding: 30px 20px 28px; }
  .contact-card { grid-template-columns: 1fr; padding: 56px 40px 44px; }
}

/* 태블릿 폭: 국기 + 메뉴가 로고에 붙지 않게 간격 줄이기 */
@media (min-width: 761px) and (max-width: 900px) {
  .header-right { gap: 12px; }
  .lang-switch { padding-right: 12px; }
  .lang-list { gap: 7px; }
  .site-nav { gap: 2px; }
  .site-nav a { padding: 5px 10px 4px; font-size: 1.02rem; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 84px 0; }
  .br-pc { display: none; }

  .nav-wrap { height: 68px; }
  .brand img { height: 48px; }
  .brand-text { display: none; }
  .header-right { gap: 10px; }

  /* backdrop-filter가 있으면 안쪽 position:fixed 위젯이 헤더 기준으로 붙어서 모바일에서는 끔 */
  .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 250, 240, .96);
  }

  /* 언어 선택 → 우측 하단 플로팅 위젯 */
  .lang-switch {
    position: fixed;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    padding: 0;
    border: 0;
  }
  .lang-toggle {
    display: block;
    width: 58px;
    height: 58px;
    padding: 5px;
    background: var(--white);
    border: 3px solid var(--ink);
    border-radius: 50%;
    box-shadow: 0 4px 0 var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .3s var(--bounce), box-shadow .15s;
  }
  .lang-toggle:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
  .lang-switch.open .lang-toggle { transform: rotate(-14deg); }

  .lang-list {
    position: absolute;
    right: 0;
    bottom: calc(100% + 16px);
    flex-direction: column;
    gap: 4px;
    min-width: 172px;
    padding: 10px;
    background: var(--white);
    border: 3px solid var(--ink);
    border-radius: 24px;
    box-shadow: 0 6px 0 rgba(90, 58, 40, .15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.9);
    transform-origin: 85% 100%;
    transition: opacity .2s, transform .3s var(--bounce), visibility .2s;
  }
  .lang-list::after {
    content: "";
    position: absolute;
    right: 21px;
    bottom: -10px;
    width: 15px;
    height: 15px;
    background: var(--white);
    border-right: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
    border-bottom-right-radius: 4px;
    transform: rotate(45deg);
  }
  .lang-switch.open .lang-list { opacity: 1; visibility: visible; transform: none; }
  .lang-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    width: auto;
    height: auto;
    padding: 7px 16px 7px 8px;
    border-radius: 16px;
    transition: background-color .2s;
  }
  .lang-list a:hover { background: var(--yellow-l); }
  .lang-list a[aria-current="page"] { background: var(--yellow); box-shadow: none; }
  .lang-list .flag { flex: none; width: 34px; height: 34px; }
  .lang-name {
    position: static;
    padding: 0;
    font-family: var(--f-title);
    font-size: 1.08rem;
    background: none;
    border: 0;
    opacity: 1;
    transform: none;
  }
  .lang-list a:hover .lang-name,
  .lang-list a:focus-visible .lang-name { transform: none; }

  /* 맨 위로 고양이는 위젯 옆으로 */
  .to-top { right: 84px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; }
  .site-footer { padding-bottom: 104px; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0 10px;
    background: var(--yellow);
    border: 3px solid var(--ink);
    border-radius: var(--r-sm);
    box-shadow: 0 3px 0 var(--ink);
    cursor: pointer;
  }
  .nav-toggle .bar {
    display: block;
    height: 3px;
    background: var(--ink);
    border-radius: 3px;
    transition: transform .3s, opacity .3s;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--white);
    border: 3px solid var(--ink);
    border-radius: var(--r);
    box-shadow: 0 8px 0 rgba(90, 58, 40, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.95);
    transform-origin: top right;
    transition: opacity .2s, transform .3s var(--bounce), visibility .2s;
  }
  .site-nav.open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { text-align: center; background: var(--c); border-color: var(--ink); }

  .hero { padding-bottom: 116px; }
  .deco:nth-of-type(n+3), .dot:nth-of-type(n+3) { display: none; }
  .deco { width: calc(var(--s) * .8); height: calc(var(--s) * .8); }

  .about-grid { grid-template-columns: 1fr; gap: 50px; }
  .about-photo { width: min(320px, 82%); margin: 0 auto; }
  .speech { right: -14px; }
  .about-text { text-align: center; }
  .chips { justify-content: center; }

  .values, .game-grid, .notes { grid-template-columns: 1fr; }
  .values { margin-top: 70px; }
  .notes { gap: 40px; }

  .contact { padding-top: 130px; }
  .contact-card { padding: 52px 22px 30px; text-align: center; }
  .peek { right: 50%; translate: 50% 0; }
}

@media (max-width: 420px) {
  .socials { grid-template-columns: 1fr; }
  .btn { padding: 13px 22px 12px; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .shooting-star { display: none; }
}
