/* 메인 화면: 게임이 늘어도 첫 화면 길이가 그대로인 "넘기는 선반 + 전체 목록" (손그림 외곽선 그림체) */

body.home {
  --ink: #3a2f2a; --line: #3a2f2a; --lw: 1.5px; --cream: #fffbf3; --paper: #f7f1e6; --wood: #e2bf8c; --orange: #f0a868; --yellow: #f2cf6b; --red: #ef8f86;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cpath d='M26 0H0V26' fill='none' stroke='%23ece3d3' stroke-width='1'/%3E%3C/svg%3E");
  color: var(--ink);
}
.home main { max-width: 1080px; padding-top: 20px; }
.home button { font-family: inherit; }

/* 외곽선: 캐릭터 외곽선과 같은 먹색 · 같은 굵기. 흔들림 필터는 화면 크기에 따라 선이 들쭉날쭉해 보여서 뺐다 (반듯한 선) */
.home .ink { position: relative; }
.home .ink::before { content: ''; position: absolute; inset: 0; border: var(--lw) solid var(--line); border-radius: inherit; pointer-events: none; z-index: 1; }

/* 위쪽: 짧게 */
.top { display: flex; align-items: flex-end; gap: 14px; padding: 0; text-align: left; }
.top-text { min-width: 0; }
/* 로고: 스티커 이미지 + 아래로 살짝 두께와 그림자 (크림 테두리가 바탕에 묻히지 않게) */
.logo { margin: 0 0 0 -10px; line-height: 0; }
.logo img { display: block; height: 96px; width: auto; filter: drop-shadow(0 3px 0 rgba(170, 135, 100, 0.3)) drop-shadow(0 6px 8px rgba(110, 80, 50, 0.16)); }
.tag { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; word-break: keep-all; }
.tag span { white-space: nowrap; }
.tag span + span::before { content: '· '; }
.online { margin: 6px 0 0; font-size: 0.86rem; color: var(--muted); }
.online b { color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3cc26a; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(60, 194, 106, 0.2); }
.peek { position: relative; margin-left: auto; display: flex; align-items: flex-end; flex: none; }
.peek canvas { display: block; transform-origin: 50% 100%; cursor: pointer; }
/* 친구의 한마디: 머리 위 말풍선, 꼬리는 말하는 친구 쪽(--tail) */
.peek-say { position: absolute; z-index: 3; max-width: 190px; padding: 6px 12px; border-radius: 14px; background: #fffdf8; border: 2px solid var(--ink); color: var(--ink); font-size: 0.82rem; font-weight: 800; line-height: 1.35; white-space: nowrap; box-shadow: 0 3px 0 rgba(58, 47, 42, 0.12); pointer-events: none; }
.peek-say::after { content: ''; position: absolute; left: calc(var(--tail, 50%) - 6px); bottom: -8px; width: 10px; height: 10px; background: #fffdf8; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.peek-say[hidden] { display: none; }
.peek-say.pop { animation: say-pop 0.32s cubic-bezier(.3, 1.6, .5, 1); transform-origin: var(--tail, 50%) 100%; }
@keyframes say-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.peek canvas.in { animation: peek-pop 0.45s cubic-bezier(.3, 1.6, .5, 1) backwards; }  /* 들어올 때 하나씩 통 튀어나온다 */
@keyframes peek-pop { from { transform: translateY(14px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.search { margin-top: 16px; display: flex; align-items: center; gap: 8px; background: var(--cream); border-radius: 18px; padding: 4px 16px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-weight: 600; font-size: 1rem; padding: 9px 0; color: var(--ink); }
.search input::placeholder { color: var(--muted); }

/* 선반: 한 줄씩 옆으로 넘긴다 */
.shelf { margin-top: 26px; }
.shelf-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
.shelf-head h2 { margin: 0; font-size: 1.1rem; font-weight: 900; }
.shelf-head .more { margin-left: auto; padding: 0; border: 0; background: none; font-size: 0.82rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.shelf-head .arrows { display: flex; gap: 6px; }
.shelf-head h2 + .arrows { margin-left: auto; }
.shelf-head .arrows button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--cream); font-weight: 900; font-size: 1rem; color: var(--ink); cursor: pointer; }
.row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 10px 4px 10px; }
.row::-webkit-scrollbar { display: none; }
.plank { height: 18px; background: var(--wood); border-radius: 9px; margin-top: -8px; }

/* 게임 카드: 상자 없이 아이콘에만 외곽선 */
.card { flex: 0 0 132px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.gt-icon { position: relative; display: block; width: 100%; border-radius: 26%; }
.gt-icon img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 26%; background: #efe6d6; transition: transform 0.15s; }
.card:hover .gt-icon img, .card:focus-visible .gt-icon img { transform: translateY(-3px); }
.card:active .gt-icon img { transform: scale(0.95); }
.gt-name { margin-top: 8px; font-size: 0.88rem; line-height: 1.25; word-break: keep-all; }
.gt-hook { margin-top: 2px; color: var(--muted); font-size: 0.72rem; line-height: 1.3; word-break: keep-all; }
.gt-new { position: absolute; top: -8px; right: -6px; z-index: 2; padding: 2px 7px; border-radius: 999px; background: var(--red); color: #fff; font-style: normal; font-size: 0.64rem; font-weight: 900; }
.home .gt-new.ink { position: absolute; } /* 외곽선용 relative보다 앞서게 */
.home .gt-new.ink::before, .home .play.ink::before { content: none; } /* NEW 표시 · 바로 하기 버튼은 외곽선 없이 */
.gc-live { position: absolute; left: 50%; bottom: -8px; z-index: 2; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; white-space: nowrap; background: #fffdf8; border: 1.5px solid var(--line); color: var(--text); font-size: 0.66rem; font-weight: 800; line-height: 1.3; }
.gc-live[hidden] { display: none; }
/* 지금 하는 사람이 있다는 표시: 초록 점이 살짝 깜빡인다 */
.gc-dot { width: 7px; height: 7px; border-radius: 50%; background: #5cbf6a; box-shadow: 0 0 0 0 rgba(92, 191, 106, 0.6); animation: gcPulse 1.6s ease-out infinite; flex: none; }
@keyframes gcPulse { 0% { box-shadow: 0 0 0 0 rgba(92, 191, 106, 0.6); } 70% { box-shadow: 0 0 0 5px rgba(92, 191, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(92, 191, 106, 0); } }
@media (prefers-reduced-motion: reduce) { .gc-dot { animation: none; } }

/* 새로 나온 게임: 큰 카드 */
.new-row .card { flex: 0 0 272px; flex-direction: row; gap: 12px; text-align: left; padding: 10px; background: var(--cream); border-radius: 22px; }
.new-row .card > img { width: 86px; height: 86px; flex: none; border-radius: 18px; display: block; }
.new-row .card b { display: block; font-size: 0.98rem; white-space: nowrap; }
.new-row .card small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 2px; word-break: keep-all; }
.new-row .card .play { display: inline-block; white-space: nowrap; position: relative; margin-top: 8px; background: var(--accent); color: #fff; border-radius: 999px; padding: 4px 11px; font-size: 0.78rem; font-weight: 800; }
.new-row .card .gt-new { top: -8px; right: 10px; }

/* 최근에 한 게임 */
.recent-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 6px; }
.recent-row::-webkit-scrollbar { display: none; }
.recent-row a { flex: none; display: flex; align-items: center; gap: 8px; background: var(--cream); border-radius: 16px; padding: 6px 12px 6px 6px; font-weight: 800; font-size: 0.88rem; color: var(--ink); text-decoration: none; }
.recent-row img { width: 40px; height: 40px; border-radius: 11px; display: block; }
.recent-row small { display: block; font-weight: 600; color: var(--muted); font-size: 0.7rem; }

/* 우르 스튜디오 신작 */
.studio { margin-top: 30px; display: flex; align-items: center; gap: 14px; background: #3d3a45; color: #f4efe6; border-radius: 22px; padding: 16px 18px; }
.studio .ico { width: 52px; height: 52px; border-radius: 14px; background: #5a5568; display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.studio b { font-size: 1rem; }
.studio small { display: block; color: #bdb4c7; font-size: 0.8rem; margin-top: 2px; }

/* 전체 게임 */
.all { margin-top: 30px; background: rgba(255, 251, 243, 0.7); border-radius: 26px; padding: 18px; }
.all-head { display: flex; align-items: center; gap: 10px; }
.all-head h2 { margin: 0; font-size: 1.25rem; font-weight: 900; }
.count { margin-left: auto; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.chips { display: flex; gap: 7px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; padding: 6px 12px; border: var(--lw) solid var(--line); border-radius: 999px; background: var(--cream); color: var(--ink); font-weight: 700; font-size: 0.84rem; white-space: nowrap; cursor: pointer; }
.chips button.sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.game-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 18px 12px; }
.game-grid li[hidden] { display: none; }
.game-grid .card { flex: none; }
.game-grid .gt-name { font-size: 0.8rem; }
.no-result { text-align: center; color: var(--muted); margin: 18px 0 4px; font-weight: 700; }

.home-foot { margin: 28px 0 0; text-align: center; color: var(--muted); font-size: 0.85rem; }
.home-foot p { margin: 4px 0; }
.home-foot a { color: var(--accent); }
.home-foot p.studio { display: block; background: none; color: var(--muted); padding: 0; margin-top: 4px; font-weight: 700; }
/* 맨 아래 만든 곳: Made by + 우르 스튜디오 로고 */
.home-foot p.made-by { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 6px; font-size: 0.8rem; letter-spacing: 0.02em; }
.home-foot p.made-by img { height: 30px; width: auto; display: block; opacity: 0.88; }

/* 미리보기 창: 휴대폰에서는 아래에서 올라오고, 넓은 화면에서는 가운데 */
.sheet {
  width: 100%; max-width: 520px; max-height: 92vh;
  margin: auto auto 0; padding: 0;
  border: 0; border-radius: 22px 22px 0 0;
  background: var(--panel); color: var(--text);
  overflow: hidden;
}
.sheet::backdrop { background: rgba(40, 25, 15, 0.45); }
.sheet[open] { animation: sheet-up 0.22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .sheet { margin: auto; border-radius: 22px; } }
.sheet-body { position: relative; display: flex; flex-direction: column; max-height: 92vh; }
.sheet-close {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.9); font-size: 1rem;
}
.sheet-shot { background: #efe6d6; display: flex; justify-content: center; overflow: hidden; flex: 0 1 auto; min-height: 0; padding: 16px 0; } /* 게임 화면 위아래로 살짝 여백 */
.sheet-shot img { border-radius: 14px; }
.sheet-shot img { display: block; width: auto; max-width: 100%; height: min(42vh, 380px); object-fit: contain; }
.sheet-info { padding: 14px 18px 18px; }
.sheet-title { display: flex; align-items: center; gap: 12px; }
.sheet-title img { width: 56px; height: 56px; border-radius: 24%; box-shadow: 0 2px 8px rgba(120, 80, 50, 0.16); flex: none; }
.sheet-title h2 { margin: 0; font-size: 1.25rem; }
.sheet-live { display: inline-flex; align-items: center; gap: 5px; margin: 4px 0 0; padding: 2px 10px 2px 8px; border-radius: 999px; background: #fffdf8; border: 1.5px solid var(--line); color: var(--text); font-size: 0.8rem; font-weight: 800; line-height: 1.4; }
.sheet-live[hidden] { display: none; }
.sheet-desc { margin: 12px 0 6px; line-height: 1.5; word-break: keep-all; }
.sheet-modes { margin: 0 0 14px; color: var(--muted); font-size: 0.86rem; }
.sheet-play {
  display: block; padding: 14px; border-radius: 14px;
  background: var(--accent); color: #fff; text-align: center; text-decoration: none;
  font-size: 1.1rem; font-weight: 800;
}
.sheet-play:active { transform: scale(0.98); }

/* 랭킹 */
.rank-section { margin: 30px 0 0; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 14px 14px 12px; }
.rank-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rank-top h2 { margin: 0; font-size: 1.2rem; }
.rank-period { display: flex; gap: 4px; }
.rank-period button, .rank-tabs button { padding: 4px 12px; font-size: 0.88rem; border-radius: 999px; }
.rank-period button.sel, .rank-tabs button.sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.rank-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 4px; padding-bottom: 4px; scrollbar-width: none; }
.rank-tabs button { flex: none; white-space: nowrap; }
.rank-what { margin: 4px 0 6px; color: var(--muted); font-size: 0.85rem; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--border); }
.rank-list li:first-child { border-top: 0; }
.rank-list .no { width: 38px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.rank-list .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .sc { font-weight: 800; color: var(--accent); flex: none; }
.rank-list .mine { background: #fff6dc; border-radius: 8px; }
.rank-list .empty { justify-content: center; color: var(--muted); padding: 18px 0; }
.rank-me { margin: 8px 0 0; text-align: center; font-weight: 700; font-size: 0.9rem; }
.rank-me:empty { display: none; }
.rank-note { margin: 8px 0 0; color: var(--muted); font-size: 0.78rem; text-align: center; }

/* 랭킹 더 보기 */
.rank-list li[hidden] { display: none; }
.rank-more { display: block; width: 100%; margin: 6px 0 0; padding: 8px; font-size: 0.9rem; font-weight: 700; color: var(--muted); background: transparent; border: 1px dashed var(--border); border-radius: 10px; }
.rank-more[hidden] { display: none; }

/* 펼친 랭킹은 상자 안에서 스크롤, 내 순위 줄은 그 아래에 */
.rank-list.open { max-height: min(55vh, 440px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.rank-me-row { margin-top: 4px; border-top: 2px solid var(--border); }
.rank-me-row[hidden] { display: none; }
.rank-me-row small { color: var(--muted); font-weight: 600; }


/* 새 그림체에 맞춘 미리보기 창 · 랭킹 */
.home .sheet { background: var(--cream); max-height: calc(100dvh - 16px); }
/* 낮은 화면에서도 시작하기와 닫기가 늘 보이게: 창 안을 스크롤, 장면 사진은 줄인다 */
.home .sheet-body { max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; }
.home .sheet-close { position: sticky; top: 10px; margin: 10px 10px -46px auto; display: block; }
@media (max-width: 380px), (max-height: 700px) { .home .sheet-shot { padding: 10px 0; } .home .sheet-shot img { height: min(30vh, 260px); } .home .sheet-info { padding: 12px 14px 14px; } }
.home .sheet-play { background: var(--accent); color: #fff; border: var(--lw) solid var(--line); } /* 게임 시작 버튼과 같은 모양 */
.home .sheet-play:focus:not(:focus-visible) { outline: none; }
.home .sheet-title img { box-shadow: none; border: var(--lw) solid var(--line); }
.home .rank-section { margin-top: 26px; background: var(--cream); border: 0; border-radius: 22px; padding: 16px 18px 14px; }
.home .rank-period button, .home .rank-tabs button { border: var(--lw) solid var(--line); background: var(--cream); color: var(--ink); font-weight: 700; }
.home .rank-period button.sel, .home .rank-tabs button.sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.home .rank-list .sc { color: var(--ink); }

/* 휴대폰: 숨 쉴 틈을 크게, 선은 적게 */
@media (max-width: 640px) {
  .home main { padding-left: 18px; padding-right: 18px; }
  /* 친구들은 글씨 옆에 어중간하게 뜨지 않고, 찾기 칸 위에 나란히 앉아 고개를 내민다 */
  .top { align-items: flex-end; }
  .peek { position: relative; z-index: 1; gap: 2px; margin-bottom: -6px; }
  .logo { margin-left: -4px; }
  .logo img { height: 64px; filter: drop-shadow(0 2px 0 rgba(170, 135, 100, 0.3)) drop-shadow(0 4px 5px rgba(110, 80, 50, 0.16)); }
  .tag { font-size: 0.8rem; line-height: 1.5; }
  .tag span { display: block; }
  .tag span + span::before { content: none; }
  .peek canvas:nth-child(n+3) { display: none; }
  .search { margin-top: 14px; }
  .shelf { margin-top: 30px; }
  .shelf-head { margin-bottom: 10px; }
  .shelf-head h2 { font-size: 1.04rem; }
  .shelf-head .arrows { display: none; }
  .row { margin-right: -18px; padding-right: 18px; }
  .card { flex-basis: 96px; }
  .row .gt-hook { display: none; }
  .gt-name { font-size: 0.8rem; }
  .plank { display: none; }
  .new-row .card { flex-basis: 268px; }
  .studio { margin-top: 34px; }
  .all { background: none; padding: 0; margin-top: 36px; }
  .home .all::before { display: none; }
  .chips { margin-right: -18px; padding-right: 18px; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; }
  .game-grid .gt-hook { display: none; }
}
@media (min-width: 641px) and (max-width: 900px) { .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* 랭킹 게임 탭: 이모지 대신 게임 아이콘 그림 */
.rank-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 12px; line-height: 1.2; }
.rt-ico { flex: none; display: block; width: 18px; height: 18px; border-radius: 5px; border: var(--lw) solid var(--line); object-fit: cover; }
.studio .ico .yuru-ico { display: block; margin: 0; }

/* 세로 화면 전용: 휴대폰을 가로로 눕히면 게임 대신 안내를 덮는다 (폴드를 펼친 넓은 화면은 높이가 커서 해당 없음) */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
  html, body { overflow: hidden; }
  body::after {
    content: '📱\A휴대폰을 세로로 돌려 주세요\A냥게임즈는 세로 화면에서 할 수 있어요';
    white-space: pre; text-align: center; line-height: 1.7;
    position: fixed; inset: 0; z-index: 2147483000;
    display: flex; align-items: center; justify-content: center;
    background: #f7f1e6; color: #3a2f2a;
    font: 800 1.05rem 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  }
}

/* 앱으로 설치 버튼과 안내 창 */
.install-btn { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #fffdf8; border: 1.5px solid var(--line); color: var(--ink); font: inherit; font-size: 0.86rem; font-weight: 800; cursor: pointer; }
.install-btn[hidden] { display: none; }
.install-card { max-width: 340px; text-align: left; }
.install-title { margin: 0 0 12px; font-size: 1.15rem; font-weight: 900; text-align: center; }
.install-steps ol { margin: 0 0 16px; padding-left: 1.3em; line-height: 1.7; }
.install-steps b { color: var(--accent, #d9774f); }
.install-steps p { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.install-steps .install-lead { color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.install-steps .install-note { font-size: 0.8rem; }
.install-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.install-pick[hidden] { display: none; }
.install-pick button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; border-radius: 16px; background: #fffdf8; border: 2px solid transparent; font: inherit; font-size: 0.78rem; font-weight: 800; color: var(--ink); cursor: pointer; }
.install-pick img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.install-pick button.on { border-color: var(--accent, #d9774f); background: #fff3e8; }
.welcome-card { max-width: 360px; text-align: center; }
.welcome-sub { margin: -6px 0 8px; color: var(--muted); font-size: 0.88rem; }
.welcome-face { display: grid; place-items: center; height: 80px; margin-bottom: 6px; }
.welcome-face .yuru-face { width: 72px; height: 72px; }
.welcome-animals { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, 40px); grid-auto-columns: 40px; gap: 4px; padding: 2px 2px 8px; margin: 0 0 10px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.welcome-animals button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 10px; background: #fff; border: 1.5px solid var(--line); cursor: pointer; }
.welcome-animals button.sel { border-color: var(--accent, #d9774f); box-shadow: 0 0 0 2px var(--accent, #d9774f) inset; background: #fff3e8; }
.welcome-form { display: flex; gap: 6px; justify-content: center; }
.welcome-form input { flex: 1; min-width: 0; max-width: 200px; padding: 8px 10px; font: inherit; font-size: 16px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.welcome-form button { padding: 8px 14px; }
.welcome-msg { margin: 8px 0 4px; color: var(--muted); font-size: 0.8rem; }
.welcome-skip { margin-top: 4px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.82rem; text-decoration: underline; cursor: pointer; }
.welcome-msg.bad { color: #d0573f; font-weight: 700; }

/* 말랑골 농장 입구 */
.farm-door { margin-top: 30px; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 22px; background: #eaf3dc; color: var(--ink); text-decoration: none; }
.farm-door img { width: 56px; height: 56px; border-radius: 14px; flex: none; display: block; }
.farm-door span { flex: 1; min-width: 0; }
.farm-door b { display: block; font-size: 1rem; }
.farm-door small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; word-break: keep-all; }
.farm-door i { font-style: normal; font-size: 1.6rem; font-weight: 900; color: var(--muted); }
.farm-door:hover { background: #e0edcd; }
.farm-door[hidden] { display: none; }
.farm-door + .studio { margin-top: 14px; }

/* 내 기록 옮기기 (내 코드) */
.code-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; text-decoration: underline; cursor: pointer; }
.code-card { max-width: 360px; text-align: left; }
.code-lead { margin: -4px 0 12px; color: var(--muted); font-size: 0.86rem; word-break: keep-all; }
.code-mine, .code-use { display: grid; gap: 8px; padding: 12px; border: var(--lw) solid var(--line); border-radius: 16px; background: #fffdf8; margin-bottom: 12px; }
.code-mine b, .code-use b { font-size: 0.92rem; }
.code-mine small, .code-use small { color: var(--muted); font-size: 0.76rem; word-break: keep-all; }
.code-show { font: 900 1.6rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: 0.08em; text-align: center; padding: 8px; border-radius: 12px; background: #fdeec2; }
.code-use input { font: 700 1.1rem ui-monospace, Consolas, monospace; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 10px; border: var(--lw) solid var(--line); border-radius: 10px; background: #fff; }
.code-uses { color: var(--ink) !important; font-weight: 700; }
.code-renew { background: none; border: 0; padding: 0; font: inherit; font-size: 0.8rem; font-weight: 700; color: #a8532b; text-decoration: underline; cursor: pointer; justify-self: start; }
.code-msg { min-height: 1.2em; margin: 0 0 4px; font-size: 0.84rem; font-weight: 700; color: #a8532b; text-align: center; }

/* 위쪽 버튼 줄: 앱으로 설치 · 내 기록 옮기기 */
.top-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.top-btns .install-btn { margin-top: 0; }
/* 맨 아래 '게임 넣기' 배너 (블로그·사이트·앱 운영자용) */
.home-foot .partner-banner { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; padding: 14px 18px; border-radius: 22px; background: #f3e2c4; color: var(--ink); text-decoration: none; text-align: left; }
.home-foot .partner-banner:hover { background: #efd9b3; }
.pb-ico { width: 52px; height: 52px; border-radius: 16px; background: #fffbf3; display: grid; place-items: center; flex: none; font-size: 1.5rem; }
.pb-text { min-width: 0; }
.pb-text b { display: block; font-size: 1rem; }
.pb-text small { display: block; color: #7a5e3e; font-size: 0.82rem; margin-top: 2px; word-break: keep-all; }
.pb-cta { margin-left: auto; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; font-size: 0.85rem; white-space: nowrap; }
/* 폰: 한 줄 그대로 두고, 버튼은 오른쪽 화살표만 (배너 전체를 누르면 된다) */
@media (max-width: 640px) {
  .home-foot .partner-banner { gap: 12px; padding: 12px 12px 12px 14px; }
  .pb-ico { width: 44px; height: 44px; border-radius: 14px; font-size: 1.3rem; }
  .pb-text { flex: 1; }
  .pb-text b { font-size: 0.92rem; line-height: 1.35; word-break: keep-all; }
  .pb-text small { font-size: 0.78rem; }
  .pb-cta { width: auto; height: auto; padding: 0 2px; background: none; color: var(--ink); display: grid; place-items: center; font-size: 0; flex: none; }
  .pb-cta::before { content: '›'; font-size: 1.8rem; font-weight: 900; line-height: 1; margin-top: -3px; }
}
