:root {
  /* 추모관 분위기 색(2026-11-13 사용자 "전체적으로 추모 분위기"): 짙은 자주 바탕, 크림 글자, 금빛 강조 */
  --paper: #1b1524;
  --card: #2a2235;
  --ink: #f1e8da;
  --soft: #b6a996;
  --line: #4a3f5a;
  --accent: #c9a45c;
  --accent-ink: #1b1524;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
}
html[lang="zh-Hant"], html[lang="zh-TW"], html[lang="zh-HK"] { font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; }
html[lang="zh-Hant"] button, html[lang="zh-Hant"] input, html[lang="zh-Hant"] textarea, html[lang="zh-Hant"] select, html[lang="zh-TW"] button, html[lang="zh-TW"] input, html[lang="zh-TW"] textarea, html[lang="zh-TW"] select, html[lang="zh-HK"] button, html[lang="zh-HK"] input, html[lang="zh-HK"] textarea, html[lang="zh-HK"] select { font-family: inherit; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--paper); overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }
#gl { position: fixed; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; z-index: 1; }
button, input { font: inherit; color: inherit; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-weight: 600; font-size: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 0 11px; font-size: 13px; }
.btn.big { min-height: 56px; font-size: 18px; padding: 0 26px; }
.btn:focus-visible, .act:focus-visible, .pill:focus-visible, .chip:focus-visible, .sw:focus-visible, .step:focus-visible, .tab:focus-visible, .preset:focus-visible { outline: 3px solid #c9a45c; outline-offset: 2px; }

#title { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(180deg, #352b44 0%, #352b44 60%, #4a3f5a 100%); z-index: 5; }
.title-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; }
.eyebrow { margin: 0; font-size: 13px; color: var(--soft); font-weight: 600; }
.title-card h1 { margin: 0; font-size: 38px; line-height: 1.2; letter-spacing: 0; font-weight: 800; }
#title-sub { margin: 0 0 10px; line-height: 1.55; color: var(--soft); }
.fine { font-size: 12.5px; line-height: 1.5; color: var(--soft); margin: 6px 0 0; }
.fine.light { color: #fff; background: rgba(27,21,36,0.62); padding: 4px 10px; border-radius: 12px; text-align: center; margin-top: 4px; }

#studio { position: fixed; inset: 0; display: flex; flex-direction: column; z-index: 2; padding-top: env(safe-area-inset-top); }
body[data-screen="studio"] #gl { pointer-events: none; }
#steps { display: flex; gap: 2px; overflow-x: auto; padding: 6px 8px; border-bottom: 1px solid var(--line); flex: none; scrollbar-width: none; background: var(--paper); z-index: 4; }
.step { flex: none; border: 0; background: none; padding: 7px 9px; font-size: 13px; font-weight: 600; color: var(--soft); border-radius: 8px; cursor: pointer; min-height: 36px; }
.step.on { background: var(--ink); color: var(--paper); }

#ref { flex: none; position: relative; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #352b44; min-height: 56px; }
#ref.folded .ref-canvas { display: none; }
.ref-canvas { height: 15vh; min-height: 84px; max-width: 58%; object-fit: contain; border-radius: 6px; cursor: crosshair; display: block; touch-action: none; }
.ref-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ref-note { margin: 0; font-size: 12px; color: var(--soft); flex-basis: 100%; }
.ref-samples { display: flex; flex-wrap: wrap; gap: 4px; }
.ref-tools { display: flex; flex-direction: column; gap: 4px; margin-left: auto; }

#stage { flex: 1 1 auto; min-height: 0; position: relative; touch-action: none; user-select: none; z-index: 4; overflow: hidden; }
#studio-halo, #studio-photo-sw { position: absolute; top: 10px; right: 10px; z-index: 6; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 10px 0 13px; border: 1px solid rgba(70, 60, 45, .22); border-radius: 22px; background: rgba(42,34,53,0.92); color: #f1e8da; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
#studio-halo .halo-word, #studio-photo-sw .halo-word { min-width: 28px; font-size: 12px; font-weight: 800; color: #b6a996; text-align: right; }
#studio-halo.on .halo-word, #studio-photo-sw.on .halo-word { color: #e2c48c; }
#studio-halo .halo-sw, #studio-photo-sw .halo-sw { position: relative; display: block; width: 38px; height: 22px; border-radius: 11px; background: #4a3f5a; transition: background .15s; }
#studio-halo .halo-sw::after, #studio-photo-sw .halo-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #2a2235; transition: transform .15s; }
#studio-halo.on .halo-sw, #studio-photo-sw.on .halo-sw { background: #c9a45c; }
#studio-halo.on .halo-sw::after, #studio-photo-sw.on .halo-sw::after { transform: translateX(16px); }
/* 사진 켜고 끄기: 천사링 단추 바로 아래, 같은 모양(천사링 규칙을 함께 씀) */
#studio-photo-sw { top: 62px; }
#studio-photo-sw[hidden] { display: none; }
/* 우리 아이 사진: 강아지 화면 오른쪽 아래 */
.studio-photo { position: absolute; right: 10px; bottom: 10px; z-index: 5; width: min(36%, 190px); border-radius: 12px; border: 3px solid #2a2235; background: #2a2235; box-shadow: 0 4px 14px rgba(58, 42, 24, .22); overflow: hidden; pointer-events: none; }
.studio-photo[hidden] { display: none; }
.studio-photo img { display: block; width: 100%; height: auto; max-height: 34vh; object-fit: cover; }
#overlay { position: absolute; pointer-events: none; z-index: 2; }
#cursor { position: absolute; border: 2px solid #2a2235; outline: 1px solid #1b1524; border-radius: 50%; pointer-events: none; z-index: 3; }

#tools { flex: none; max-height: 40vh; overflow-y: auto; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); z-index: 4; position: relative; display: flex; flex-direction: column; gap: 7px; }
.tool-title { margin: 0; font-size: 13px; line-height: 1.45; color: var(--soft); }
.tool-title.warn { color: var(--accent); font-weight: 600; }
.hint { margin: 0; font-size: 12px; color: var(--soft); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 6px; }
.preset { display: flex; align-items: center; gap: 8px; text-align: left; padding: 7px; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: #2a2235; cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.3; }
.preset.on { border: 2px solid var(--accent); padding: 6px; }
.preset-sw { width: 28px; height: 28px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.2); }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: none; }
.tab { flex: none; border: 1px solid var(--line); background: #2a2235; padding: 0 12px; min-height: 38px; border-radius: 19px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tab.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.slider { display: grid; grid-template-columns: 102px 1fr; align-items: center; gap: 8px; font-size: 13px; min-height: 34px; }
.slider input { width: 100%; accent-color: var(--accent); height: 28px; }
.view-row { display: flex; flex-wrap: wrap; gap: 4px; }
.sw-row { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.sw-row.wrap { flex-wrap: wrap; overflow: visible; }
.sw-label { font-size: 12px; width: 56px; flex: none; color: var(--soft); }
.sw { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid rgba(0,0,0,.32); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.sw-custom { width: 36px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #2a2235; }
.eye-row { display: flex; flex-direction: column; gap: 5px; }
.habit { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.habit legend { padding: 0 0 3px; font-size: 13px; font-weight: 700; }
.chip { border: 1px solid var(--line); background: #2a2235; padding: 0 11px; min-height: 36px; border-radius: 18px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.text-row { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.text-row input { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #2a2235; }
.nav-row { display: flex; gap: 6px; position: sticky; bottom: -8px; padding: 6px 0 2px; background: var(--card); }
.nav-row .btn { flex: 1; }

#hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud-touch { position: absolute; inset: 0; touch-action: none; }
.hud-top { position: absolute; left: 10px; right: 10px; top: calc(8px + env(safe-area-inset-top)); display: flex; justify-content: space-between; align-items: center; pointer-events: none; gap: 6px; }
.hud-top > * { pointer-events: auto; }
.hud-right { display: flex; gap: 5px; }
.pill { background: rgba(27,21,36,0.68); color: #fff; border: 0; min-height: 36px; padding: 0 12px; border-radius: 18px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; }
#hud-name { cursor: default; }
#hud .sheet { position: absolute; left: 8px; right: 8px; bottom: calc(68px + env(safe-area-inset-bottom)); background: rgba(42,34,53,0.97); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.25); z-index: 2; }
#hud .sheet[hidden] { display: none !important; }
.sheet p { margin: 0; font-size: 13px; font-weight: 700; color: var(--soft); }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.sheet-grid .act { background: #352b44; min-height: 46px; box-shadow: none; }
#actions .act.on { background: var(--accent); color: var(--accent-ink); }
/* 오른쪽 줄: 위 줄 바로 아래부터 생긴 순서대로 아래로 쌓인다 */
#pills { position: absolute; right: 10px; top: calc(52px + env(safe-area-inset-top)); max-width: calc(100% - 20px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
@keyframes pill-pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } to { transform: scale(1); opacity: 1; } }
#pills > .pop { animation: pill-pop .32s ease-out both; transform-origin: right center; }
@media (prefers-reduced-motion: reduce) { #pills > .pop { animation: none; } }
#pills .pill { pointer-events: auto; min-height: 40px; }
.pill.strong { background: var(--accent); color: var(--accent-ink); }
/* 맞이 건너뛰기: 오른쪽 위 단추(똥 수, 창고)와 겹치지 않게 아래 가운데에 둔다. 맞이 중에는 아래 단추들과 대문 열기 칸이 숨겨져 비어 있다 */
.skip { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(44px + env(safe-area-inset-bottom)); white-space: nowrap; }
#gate-panel { position: absolute; left: 0; right: 0; bottom: calc(44px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
#gate-panel > * { pointer-events: auto; }
#actions { position: absolute; left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; pointer-events: none; }
.act { pointer-events: auto; min-height: 50px; border: 0; border-radius: 12px; background: rgba(42,34,53,0.94); font-size: 13.5px; font-weight: 700; cursor: pointer; padding: 2px; color: var(--ink); line-height: 1.2; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
#joy { position: absolute; left: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.55); touch-action: none; display: flex; align-items: center; justify-content: center; }
#joy-knob { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.86); box-shadow: 0 1px 3px rgba(0,0,0,.35); }

@media (min-width: 900px) {
  #studio { flex-direction: row; flex-wrap: wrap; }
  #steps { width: 100%; }
  #ref { width: 260px; flex-direction: column; align-items: stretch; height: calc(100vh - 50px); }
  .ref-canvas { height: auto; max-width: 100%; width: 100%; }
  /* 기준 사진 칸이 숨어 있으면 너비 0인 무대가 단계 줄 옆에 붙어 버려서, 무대에 기본 너비를 주어 반드시 다음 줄로 내려가게 한다 */
  #stage { flex: 1 1 320px; min-width: 0; height: calc(100vh - 50px); }
  #tools { width: 380px; max-height: none; height: calc(100vh - 50px); border-top: 0; border-left: 1px solid var(--line); }
  body[data-screen="studio"] #steps { justify-content: center; }
}

#talk-form { display: flex; gap: 5px; }
#talk-input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid #4a3f5a; border-radius: 10px; padding: 0 10px; font: inherit; font-size: 16px; background: #2a2235; color: #f1e8da; }
#talk-form .act { flex: none; width: 76px; min-height: 44px; background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.sheet-grid .act.strong { background: var(--accent); color: var(--accent-ink); }

/* 하늘 섬 화면과 창 */
#fade { position: fixed; inset: 0; background: #2a2235; opacity: 0; pointer-events: none; z-index: 8; }
#toast { position: fixed; left: 50%; top: calc(92px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 12; background: rgba(27,21,36,0.86); color: #fff; font-size: 13px; line-height: 1.4; padding: 8px 12px; border-radius: 12px; max-width: min(90vw, 420px); pointer-events: none; }
#sky-ui { position: fixed; inset: 0; z-index: 3; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
.sky-top, .sky-bottom { padding: calc(10px + env(safe-area-inset-top)) 12px 0; display: flex; flex-direction: column; gap: 8px; }
.sky-bottom { padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }
.sky-top > *, .sky-bottom > * { pointer-events: auto; }
.sky-brand { display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.sky-brand button { pointer-events: auto; }
.sky-brand h1 { margin: 0; font-size: 20px; font-weight: 800; color: #f1e8da; background: rgba(42,34,53,0.85); padding: 3px 10px; border-radius: 10px; }
#sky-q { min-height: 44px; border: 1px solid #4a3f5a; border-radius: 10px; padding: 0 12px; font-size: 16px; background: #2a2235; color: #f1e8da; width: 100%; }
.sky-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
#sky-ui .chip, .wish-list .chip { flex: none; min-height: 38px; padding: 0 12px; border-radius: 19px; border: 0; background: rgba(42,34,53,0.92); color: #f1e8da; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: #c9a45c !important; color: #1b1524 !important; }
#sky-status { margin: 0; align-self: center; font-size: 13px; background: rgba(42,34,53,0.82); color: #f1e8da; padding: 3px 10px; border-radius: 10px; text-align: center; }
#sky-status:empty { display: none; }
.sky-card { background: #2a2235; color: #f1e8da; border-radius: 14px; padding: 12px; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; box-shadow: 0 3px 16px rgba(30,60,60,.25); width: min(480px, 100%); align-self: center; }
.sky-card.tappable { cursor: pointer; }
.sky-card.tappable:focus-visible { outline: 2px solid #c9a45c; outline-offset: 2px; }
.sky-card canvas { width: 84px; height: 84px; border-radius: 10px; display: block; }
.sky-card h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.sky-card p { margin: 0; color: #b6a996; font-size: 14px; }
.sky-card .info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sky-card .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.sky-card .acts .btn { flex: 1 1 40%; padding: 0 8px; }
.sky-main { display: flex; gap: 6px; width: min(480px, 100%); align-self: center; }
.sky-main .btn { flex: 1; padding: 0 8px; background: #2a2235; color: #f1e8da; }
.sky-main .btn.primary { background: var(--accent); color: var(--accent-ink); }
.modal { position: fixed; inset: 0; z-index: 11; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28,44,48,.45); }
.modal-card { width: min(420px, 100%); max-height: 88vh; overflow-y: auto; background: #2a2235; color: #f1e8da; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.modal-card > div:not(.scroll):not(.wish-list) { display: flex; flex-direction: column; gap: 10px; }
.modal-card h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.modal-card h3 { margin: 4px 0 0; font-size: 15px; }
.modal-card p { margin: 0; color: #b6a996; font-size: 14px; line-height: 1.5; }
.modal-card input[type="text"], .modal-card textarea { width: 100%; border: 1px solid #4a3f5a; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: #2a2235; color: #f1e8da; }
#make-preview { width: 128px; height: 128px; border-radius: 12px; align-self: center; }
.scroll { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.scroll p { color: #f1e8da; }
.wish-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wish-list .chip { background: #352b44; white-space: normal; text-align: left; padding: 6px 12px; }
.log-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.log-row .btn { flex: none; min-height: 36px; padding: 0 10px; }

/* 로그인과 관리 */
.modal { z-index: 11; }
#login-sheet { z-index: 13; }
#log-sheet, #memory-sheet { z-index: 12; }
.modal-head { display: flex !important; flex-direction: row !important; justify-content: space-between; align-items: center; }
.link { background: none; border: 0; color: #b6a996; font-size: 14px; cursor: pointer; min-height: 44px; min-width: 44px; padding: 0 4px; }
.kakao { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 12px; background: #fee500; color: #191600; font-weight: 700; font-size: 16px; cursor: pointer; }
.kakao[hidden] { display: none; }
.login-or { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; color: #b6a996; font-size: 13px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: #4a3f5a; }
.login-row { display: flex !important; flex-direction: row !important; gap: 6px; }
.login-row[hidden] { display: none !important; }
.login-row input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid #4a3f5a; border-radius: 10px; padding: 0 12px; font-size: 16px; background: #2a2235; color: #f1e8da; }
.login-row .btn { flex: none; padding: 0 12px; }
.modal-card .login-fine { font-size: 12px; color: #b6a996; }
.login-fine a { color: inherit; }
.mg-top { display: flex !important; flex-direction: row !important; gap: 12px; align-items: center; }
#mg-photo { width: 84px; height: 84px; border-radius: 10px; flex: none; }
.mg-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.btn.danger { color: #e2c48c; border-color: #4a3f5a; }
#login-email { gap: 6px; }

/* 오른쪽 아래 동그란 버튼 */
#rounds { position: absolute; right: 10px; bottom: calc(68px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; direction: rtl; pointer-events: none; }
#rounds[hidden] { display: none; }
.round { position: relative; direction: ltr; pointer-events: auto; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(27,21,36,0.72); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11px; font-weight: 600; cursor: pointer; padding: 0; }
.round[aria-expanded="true"], .round.on { background: rgba(200,160,90,.85); }
.badge { position: absolute; top: -4px; right: -2px; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c9a45c; color: #1b1524; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.badge[hidden] { display: none; }
#hud .sheet { z-index: 2; }

.one-color { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.one-color .sw { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); padding: 0; cursor: pointer; }

.sky-card.no-photo { grid-template-columns: minmax(0, 1fr); }
.sky-card canvas[hidden] { display: none; }

/* 가운데 섬의 간단한 프로필: 사진, 이름, 한 줄, 버튼 하나 */
.sky-card { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; padding: 10px; align-items: center; }
.sky-card.no-photo { grid-template-columns: minmax(0, 1fr) auto; }
.sky-card canvas { width: 56px; height: 56px; }
.sky-card h2 { font-size: 17px; }
.sky-card p { font-size: 13px; line-height: 1.35; }
.sky-card #card-mood { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sky-card #card-habit { display: none; }
.sky-card .acts { display: contents; }
.sky-card #card-go { grid-column: -2 / -1; grid-row: 1; flex: none; min-height: 42px; padding: 0 12px; white-space: nowrap; }
.sky-card #card-next, .sky-card #card-log, .sky-card #card-report { grid-row: 2; min-height: 34px; padding: 0 8px; font-size: 12px; border: 0; background: transparent; color: #b6a996; text-decoration: underline; justify-self: start; }
.sky-card #card-next { grid-column: 1 / 2; }
.sky-card:not(.no-photo) #card-next { grid-column: 1 / 3; }
.sky-card #card-log, .sky-card #card-report { grid-column: -2 / -1; justify-self: end; }
.sky-card button[hidden] { display: none; }

/* 관리자 문의 아이콘과 프로필 */
.icon-pill { gap: 5px; }
.hud-right { display: flex; gap: 5px; }
.sky-card #card-name, .sky-card #card-photo { cursor: pointer; }
.modal-card.profile { background: linear-gradient(180deg, #352b44, #2a2235 55%); text-align: center; align-items: stretch; }
#profile-sheet .modal-card { max-height: 92vh; overflow-y: auto; }
.pf-stats { display: flex !important; flex-direction: row !important; gap: 6px; }
.pf-stats div { flex: 1; padding: 8px 4px; border-radius: 10px; background: rgba(120,90,40,.08); text-align: center; }
.pf-stats b { display: block; font-size: 18px; color: #f1e8da; }
.pf-stats span { font-size: 12px; color: #b6a996; }
.pf-info { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; line-height: 1.45; }
.pf-info:empty { display: none; }
.pf-info dt { color: #b6a996; white-space: nowrap; text-align: left; }
.pf-info dd { margin: 0; color: #f1e8da; text-align: left; }
#pf-photo { width: 100%; max-width: 190px; aspect-ratio: 1; align-self: center; border-radius: 14px; border: 3px solid #2a2235; }
#pf-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(120,90,40,.1); color: #f1e8da; font-size: 15px; line-height: 1.5; }
#pf-note[hidden] { display: none; }
.pf-acts { display: flex !important; flex-direction: row !important; gap: 6px; }
.pf-acts .btn { flex: 1; padding: 0 8px; }
.pf-acts .btn[hidden] { display: none; }
.pf-acts b { color: #e2c48c; }

#fade { display: flex; align-items: center; justify-content: center; }
#fade-label { position: relative; z-index: 1; color: #e2c48c; font-size: 17px; font-weight: 700; }
/* 섬으로 내려갈 때 지나가는 구름: 회색 위 흐린 구름은 연기처럼 보여서, 연한 하늘색 위로 또렷한 흰 뭉게구름(동그란 덩이를 겹치고 아래에 옅은 그늘)이
   가운데에서 화면 밖으로 커지며 지나가 앞으로 나아가는 느낌을 준다. 흰 화면은 눈이 부셔서 하늘색을 깐다. 밤에는 짙은 밤하늘 위 옅은 구름 */
#fade { background: #1b1524; background: linear-gradient(180deg, #1b1524 0%, #2a2235 55%, #352b44 100%); overflow: hidden; }
#fade.night { background: #1b1524; background: linear-gradient(180deg, #1b1524 0%, #2a2235 100%); }
#fade.night #fade-label { color: #e8eef2; }
.fade-clouds { position: absolute; inset: 0; }
#fade.night .fade-clouds { opacity: 0.45; }
/* 입체 구름으로 덮은 뒤 마당이 준비되는 동안: 큰 구름 속과 같은 색 판 */
#fade.vol { background: #2a2235; }
#fade.vol.night { background: #352b44; }
#fade.vol .fade-clouds { display: none; }
.fade-cloud { position: absolute; inset: -10%; opacity: 0; }
#fade.on .fade-cloud { animation: cloud-pass 1.6s linear infinite; will-change: transform, opacity; }
.fade-cloud:nth-child(1) { background: radial-gradient(ellipse 12% 8% at 16% 38%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 14% 11% at 23% 34%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 13% 10% at 31% 35%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 11% 8% at 38% 39%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 8% at 27% 40%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 6% at 27% 44%, rgba(178, 204, 228, 0.85) 40%, rgba(178, 204, 228, 0) 76%); animation-delay: 0s !important; }
.fade-cloud:nth-child(2) { background: radial-gradient(ellipse 12% 8% at 64% 32%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 14% 11% at 71% 28%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 13% 10% at 79% 29%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 11% 8% at 86% 33%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 8% at 75% 34%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 6% at 75% 38%, rgba(178, 204, 228, 0.85) 40%, rgba(178, 204, 228, 0) 76%); animation-delay: -0.27s !important; }
.fade-cloud:nth-child(3) { background: radial-gradient(ellipse 12% 8% at 20% 74%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 14% 11% at 27% 70%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 13% 10% at 35% 71%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 11% 8% at 42% 75%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 8% at 31% 76%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 6% at 31% 80%, rgba(178, 204, 228, 0.85) 40%, rgba(178, 204, 228, 0) 76%); animation-delay: -0.53s !important; }
.fade-cloud:nth-child(4) { background: radial-gradient(ellipse 12% 8% at 66% 70%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 14% 11% at 73% 66%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 13% 10% at 81% 67%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 11% 8% at 88% 71%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 8% at 77% 72%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 6% at 77% 76%, rgba(178, 204, 228, 0.85) 40%, rgba(178, 204, 228, 0) 76%); animation-delay: -0.8s !important; }
.fade-cloud:nth-child(5) { background: radial-gradient(ellipse 12% 8% at 40% 22%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 14% 11% at 47% 18%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 13% 10% at 55% 19%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 11% 8% at 62% 23%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 8% at 51% 24%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 6% at 51% 28%, rgba(178, 204, 228, 0.85) 40%, rgba(178, 204, 228, 0) 76%); animation-delay: -1.07s !important; }
.fade-cloud:nth-child(6) { background: radial-gradient(ellipse 12% 8% at 42% 84%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 14% 11% at 49% 80%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 13% 10% at 57% 81%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 11% 8% at 64% 85%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 8% at 53% 86%, var(--fc, #2a2235) 56%, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 30% 6% at 53% 90%, rgba(178, 204, 228, 0.85) 40%, rgba(178, 204, 228, 0) 76%); animation-delay: -1.33s !important; }
/* 별·섬으로 갈 때의 구름 덮개(cloudOn이 on을 붙인다)는 밝게(2026-11-18 사용자 "처음 시작할 때 연기가 자주색 검다? 밝은 색으로"): 연한 하늘색 위 흰 구름.
   다른 어두운 전환(on이 없는 #fade)은 그대로 둔다. 밤에도 밝게 두되 조금만 가라앉힌다 */
#fade.on { --fc: #ffffff; background: #cfe6f6; background: linear-gradient(180deg, #a9d3f0 0%, #d3e9f7 55%, #f2f8fc 100%); }
#fade.on.night { background: #bcd6ec; background: linear-gradient(180deg, #98bfe2 0%, #c6dcee 60%, #e6eff7 100%); }
#fade.on.night .fade-clouds { opacity: 0.9; }
#fade.on.vol { background: #eaf4fb; }
#fade.on.vol.night { background: #dbe8f3; }
#fade.on #fade-label, #fade.on.night #fade-label { color: #4a3b22; }
@keyframes cloud-pass { 0% { transform: scale(0.35); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #fade.on .fade-cloud { animation: none; opacity: 0.7; } }

/* 미션 한 줄 */
#mission { margin: 0; max-width: 100%; color: #ffe9a8; pointer-events: none !important; cursor: default; }
#mission[hidden] { display: none; }

/* 강아지 머리 위 바라는 것 말풍선. 누르면 해 준다. */
#act-need { position: absolute; left: 0; top: 0; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: #2a2235; color: #e2c48c; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 12px rgba(30,50,50,.35); cursor: pointer; z-index: 2; }
#act-need[hidden] { display: none; }
/* 똥이 마려울 때 머리 위 풍선말(누를 수 없음) */
#potty-wish { position: absolute; left: 0; top: 0; width: 54px; height: 54px; border-radius: 50%; background: #2a2235; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 12px rgba(30,50,50,.35); pointer-events: none; z-index: 2; animation: pottybob 1.6s ease-in-out infinite; }
#potty-wish[hidden] { display: none; }
#potty-wish::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid #2a2235; }
@keyframes pottybob { 0%, 100% { margin-top: 0; } 50% { margin-top: -4px; } }
@media (prefers-reduced-motion: reduce) { #potty-wish { animation: none; } }
#dog-react { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5; }
#dog-react[hidden] { display: none; }
.react-badge { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: #2a2235; box-shadow: 0 3px 10px rgba(40, 30, 15, .28); }
.react-badge.go { animation: reactpop 2.3s ease-out both; }
@keyframes reactpop { 0% { transform: translateY(8px) scale(.4); opacity: 0; } 12% { transform: translateY(0) scale(1.12); opacity: 1; } 22% { transform: translateY(0) scale(1); } 75% { transform: translateY(-14px) scale(1); opacity: 1; } 100% { transform: translateY(-26px) scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .react-badge.go { animation: none; } }
#act-need::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid #2a2235; }
#act-need .sr, .react-badge .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#story-photo { display: block; width: 100%; max-height: 42vh; object-fit: contain; border-radius: 12px; background: #2a2235; }
#story-photo[hidden], #story-credit[hidden] { display: none; }
#story-credit { color: #b6a996; }

#sky-about { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 340px) { #sky-about { display: none; } }

#watch-bar { display: none; }
body[data-watch] #watch-bar { display: flex; position: absolute; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(42,34,53,0.95); pointer-events: auto; z-index: 6; }
#watch-bar p { margin: 0; font-size: 14px; line-height: 1.45; color: #f1e8da; }
body[data-watch] #actions, body[data-watch] #rounds, body[data-watch] #pills, body[data-watch] #tab-talk, body[data-watch] #tab-menu, body[data-watch] #tab-emote, body[data-watch] #mission, body[data-watch] #hud-fb, body[data-watch] #act-need, body[data-watch] #dog-react { display: none !important; }
body[data-watch] #joy { bottom: calc(150px + env(safe-area-inset-bottom)); }

.sound-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 0 10px; }
.sound-pill .snd-off { display: none; }
.sound-pill.off .snd-on { display: none; }
.sound-pill.off .snd-off { display: inline; }

/* 카드가 열리면 같은 일을 하는 버튼만 숨기고 공원 가기는 언제나 둔다 */
#sky-card:not([hidden]) ~ .sky-main #sky-main, #sky-card:not([hidden]) ~ .sky-main #sky-rand { display: none; }

body[data-leaving] #hud * { pointer-events: none !important; }

/* 꾸미기 아래 줄: 저장 버튼을 눈에 띄게 둔다 */
.nav-row .save-now { background: #c9a45c; color: #1b1524; border-color: #c9a45c; font-weight: 700; }
.nav-row .save-now:disabled { opacity: .6; }

.pf-kind { margin: 0; padding: 7px 10px; border-radius: 10px; background: #352b44; color: #f1e8da; font-size: 13px; font-weight: 700; text-align: center; }

/* 내 문의와 답변 */
#fb-mine { margin-top: 12px; max-height: 38vh; overflow-y: auto; border-top: 1px solid rgba(58, 42, 24, 0.14); padding-top: 10px; }
.fb-mine-head { margin: 0 0 8px; font-weight: 700; font-size: 14px; }
.fb-item { padding: 8px 0; border-bottom: 1px solid rgba(58, 42, 24, 0.08); }
.fb-q { margin: 0 0 4px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.fb-a { margin: 0; font-size: 14px; font-weight: 600; color: #e2c48c; white-space: pre-wrap; word-break: break-word; }
.fb-a.wait { font-weight: 400; color: #b6a996; }
.has-reply { position: relative; }
.has-reply::after { content: ''; position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #c9a45c; }
.lang-pill { appearance: none; -webkit-appearance: none; border: 0; font: inherit; font-size: 13px; padding: 0 10px; cursor: pointer; max-width: 84px; }
.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: #b6a996; margin: 6px 0; }
.lang-select { min-height: 36px; padding: 0 10px; border: 1px solid #352b44; border-radius: 10px; background: #2a2235; color: #f1e8da; font: inherit; }
/* 메뉴의 언어 목록: 펼치는 칸 대신 단추를 두 줄씩 늘어놓는다. 지금 쓰는 언어는 금빛 */
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.lang-opt { min-height: 46px; padding: 0 10px; border: 1.5px solid #352b44; border-radius: 12px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.lang-opt.wide { grid-column: 1 / -1; }
.lang-opt.on { background: #c9a45c; color: #1b1524; border-color: #c9a45c; }
/* 영어·일본어는 글자가 길어 좁은 화면에서는 윗줄의 이름을 뺀다 */
@media (max-width: 460px) { html:not([lang="ko"]) .sky-brand h1 { display: none; } html:not([lang="ko"]) .sky-brand { justify-content: flex-end; } }
#profile-sheet .modal-card { position: relative; }
.modal-card .pf-report { position: absolute; top: 8px; right: 8px; width: auto; min-height: 32px; margin: 0; padding: 2px 8px; border: 0; background: none; box-shadow: none; font-size: 12px; font-weight: 400; color: #b6a996; text-decoration: underline; cursor: pointer; }
.modal-card .pf-report[hidden] { display: none; }
.whisper-del { margin-top: 2px; padding: 2px 0; min-height: 28px; border: 0; background: none; color: #b6a996; font-size: 12px; text-decoration: underline; cursor: pointer; }
#whisper-list { max-height: 18vh; overflow-y: auto; }
.photo-preview { display: block; width: auto; max-width: 100%; max-height: 52vh; align-self: center; border-radius: 12px; }
.pf-report-inline { align-self: center; width: auto; min-height: 30px; padding: 2px 10px; border: 0; background: none; font-size: 12px; color: #b6a996; text-decoration: underline; cursor: pointer; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 50vh; overflow-y: auto; }
.album-cell { display: flex; flex-direction: column; align-items: center; }
.album-cell img { width: 100%; aspect-ratio: 3 / 5; object-fit: cover; border-radius: 8px; cursor: pointer; }
#sky-install { flex: none; min-height: 34px; margin-left: auto; background: #2a2235; color: #f1e8da; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); max-width: 90px; }
.tag-title { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: #f1e8da; }
.tag-title span { margin-left: 6px; font-size: 12px; font-weight: 400; color: #b6a996; }
.tag-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-card .tag-wrap .chip { flex: none; width: auto; min-height: 32px; padding: 0 10px; font-size: 13px; }
#fb-preview { display: flex; align-items: center; gap: 10px; }
#fb-preview[hidden] { display: none; }
#fb-img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.fb-note { margin: 0; font-size: 12px; color: #b6a996; }
.record-photo { display: block; max-width: 220px; max-height: 220px; margin: 8px 0; border-radius: 8px; }
.modal-card > .tag-wrap:not(.scroll) { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.tag-wrap > button.chip { flex: 0 0 auto !important; width: auto !important; }
.news-list { display: flex; flex-direction: column; gap: 12px; max-height: 58vh; overflow-y: auto; }
.news-old { display: flex; flex-direction: column; gap: 12px; }
.news-old[hidden] { display: none; }
.news-event { padding: 12px 14px; border: 1px solid rgba(226, 196, 140, .45); border-radius: 12px; background: rgba(226, 196, 140, .08); }
.news-due { margin-top: 6px; color: #e2c48c !important; }
.news-go { display: flex; align-items: center; justify-content: center; margin-top: 10px; min-height: 44px; padding: 0 14px; text-decoration: none; color: #e2c48c; font-weight: 700; font-size: 15px; border: 1px solid rgba(226, 196, 140, .55); border-radius: 12px; background: rgba(226, 196, 140, .1); }
.news-go:visited { color: #e2c48c; }
.news-go[hidden] { display: none; }
.news-head b { font-size: 13px; opacity: .7; }
.news-item b { display: block; font-size: 15px; color: #e2c48c; }
.news-item span { display: block; font-size: 14px; line-height: 1.5; color: #f1e8da; }
.has-new { position: relative; }
.has-new::before { content: var(--eden-new-label, 'NEW'); position: absolute; top: -6px; right: -4px; z-index: 2; padding: 1px 5px; border-radius: 8px; background: #c9a45c; color: #1b1524; font-size: 10px; font-weight: 800; line-height: 1.3; letter-spacing: 0; pointer-events: none; }
/* 사진 콘테스트 단추의 작은 New 배너: 콘테스트가 열려 있는 동안 늘 붙어 있다. 새 참가 사진이 있으면 NEW 글자를 겹치지 않고 배너에 밝은 테두리만 더한다 */
.pill.contest-on { position: relative; padding-right: 44px; }
/* 배너는 단추 안쪽 오른쪽 끝에 둔다. 밖으로 내밀면 화면 가장자리나 겉 상자에 잘린다 */
.pill.contest-on::after { content: var(--eden-new-label, 'NEW'); position: absolute; top: 50%; right: 9px; z-index: 2; padding: 1px 5px; border-radius: 7px; background: #c9a45c; color: #1b1524; font-size: 9px; font-weight: 800; line-height: 1.3; letter-spacing: .02em; transform: translateY(-50%) rotate(6deg); box-shadow: 0 1px 2px rgba(0,0,0,.25); pointer-events: none; }
.pill.contest-on.has-new::before { display: none; }
.pill.contest-on.has-new::after { box-shadow: 0 0 0 2px #2a2235, 0 1px 2px rgba(0,0,0,.25); }

.contest-list { display: flex; flex-direction: column; gap: 14px; }
/* 참가 사진 한 장씩 테두리 칸으로 묶어 이름·사진·좋아요가 어느 아이 것인지 바로 보이게 한다 */
.contest-item { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.contest-item .contest-name { font-size: 16px; color: #f1e8da; padding: 0 2px; }
.contest-item .contest-acts { margin-top: 0; }
.contest-item .contest-row { justify-content: flex-end; }
.contest-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.contest-pair figure { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #b6a996; text-align: center; }
.contest-pair img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #352b44; }
.contest-preview { width: 100%; border-radius: 10px; }
.contest-shot { margin: 0; }
/* 시작 모습 위 종 고르기 두 단추 */
.species-row { display: flex; gap: 8px; margin: 0 0 10px; }
.species { flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 9px 6px; font-size: 14px; font-weight: 700; cursor: pointer; }
.species.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* 참가 사진 아래 줄: 왼쪽 좋아요, 오른쪽 작은 신고 */
.contest-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.contest-like { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; padding: 5px 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.contest-like.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.contest-report { border: 0; background: none; color: var(--soft); font-size: 12px; text-decoration: underline; padding: 5px 2px; cursor: pointer; }
.contest-shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #352b44; }
.contest-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.contest-row strong { font-size: 15px; }
.contest-best { color: #e2c48c; font-size: 13px; font-weight: 700; }
.tag-new { display: inline-block; padding: 1px 5px; margin-left: 2px; border-radius: 6px; background: #c9a45c; color: #1b1524; font-size: 10px; font-weight: 800; vertical-align: middle; }
.contest-list h3 { margin: 4px 0 0; font-size: 15px; }
.sky-feed { align-self: flex-start; max-width: 100%; display: flex; align-items: center; margin: 0; padding: 4px 12px 4px 8px; border: 0; border-radius: 999px; background: rgba(42,34,53,0.86); color: #f1e8da; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.35; text-align: left; cursor: pointer; transition: opacity 0.26s ease; }
.sky-feed[hidden] { display: none; }
.sky-feed.out { opacity: 0; }
.sky-feed img { flex: none; width: 16px; height: 16px; margin-right: 6px; }
.sky-feed .feed-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sky-count { margin: 0; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: rgba(42,34,53,0.86); color: #f1e8da; font-size: 12px; font-weight: 700; }
#sky-q[hidden] { display: none; }

/* 프로필 창 */
#profile-sheet { backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.modal-card.profile { background: #2a2235; border: 1px solid #ecdcc0; border-radius: 22px; padding: 16px 18px 12px; gap: 10px; }
/* 로비에서 연 소개 창: 로비 초저녁 하늘(보랏빛 위, 노을빛 아래)에 맞춘 옅은 배경 */
/* 로비에서 연 소개 창: 카드가 아니라 창 뒤쪽에 색을 칠한다(카드에 칠하면 입체 사진 판을 가린다) */
#profile-sheet.pf-lobby { background: linear-gradient(180deg, #352b44 0%, #352b44 42%, #352b44 78%, #2a2235 100%); }
/* 상자 장면(pf-3d)일 때는 뒷배경을 어둡게, 가운데가 조금 밝은 그라데이션으로(2026-11-13 사용자 "배경을 어둡게, 그라데이션"). 글자는 밝게 */
#profile-sheet.pf-3d, #profile-sheet.pf-3d.pf-lobby { background: radial-gradient(ellipse 120% 80% at 50% 32%, #2c2142 0%, #1f1830 46%, #130e1c 100%); }
#profile-sheet.pf-3d .modal-card.profile #pf-title, #profile-sheet.pf-3d .modal-card.profile .pf-meta-row, #profile-sheet.pf-3d .modal-card.profile .pf-meta-row #pf-meta, #profile-sheet.pf-3d .modal-card.profile .pf-plate #pf-meta { color: #f3e9dc; }
#profile-sheet.pf-3d .pf-badge { background: rgba(255,255,255,.14); color: #f3e9dc; }
#profile-sheet.pf-3d .modal-card.profile #pf-note { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #f3e9dc; }
#profile-sheet.pf-3d .pf-go-row { background: rgba(27,21,36,0.86); }
#profile-sheet.pf-3d .modal-card { scrollbar-color: rgba(255,255,255,.25) transparent; }
/* 상자 장면 소개 창이 열릴 때 빠른 디졸브(2026-11-13 사용자) */
@keyframes pf-dissolve { from { opacity: 0; } to { opacity: 1; } }
#profile-sheet.pf-3d:not([hidden]) { animation: pf-dissolve 0.55s ease-out; }
@media (prefers-reduced-motion: reduce) { #profile-sheet.pf-3d:not([hidden]) { animation: none; } }
#profile-sheet.pf-3d .modal-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); }
.modal-card.profile .pf-top { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; width: 100%; }
.pf-badge { padding: 4px 12px; border-radius: 999px; background: #4a3f5a; color: #f1e8da; font-size: 13px; font-weight: 700; }
.modal-card .pf-x { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid #4a3f5a; border-radius: 50%; background: transparent; color: #f1e8da; box-shadow: none; cursor: pointer; }
.modal-card.profile #pf-photo { max-width: 150px; border: 4px solid #2a2235; border-radius: 18px; }
.modal-card.profile h2 { margin: 2px 0 0; text-align: center; font-size: 24px; color: #f1e8da; }
#pf-meta { margin: -4px 0 0; text-align: center; font-size: 13px; color: #b6a996; }
#pf-meta:empty { display: none; }
.modal-card.profile .pf-stats { align-items: center; padding: 8px; gap: 0; border-radius: 14px; background: #352b44; }
.modal-card.profile .pf-stats div { display: flex; flex-direction: column; min-width: 0; align-items: center; justify-content: center; gap: 6px; padding: 2px 4px; background: none; border-radius: 0; }
.modal-card.profile .pf-stats div + div { border-left: 1px solid #4a3f5a; }
.modal-card.profile .pf-stats div[hidden] { display: none; }
.modal-card.profile .pf-stats b { display: inline; max-width: 100%; overflow-wrap: anywhere; font-size: 16px; }
.modal-card.profile .pf-stats span { max-width: 100%; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.modal-card.profile .pf-stats img { flex: none; }
.modal-card.profile .pf-acts .btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; background: transparent; border: 1px solid #4a3f5a; border-radius: 12px; box-shadow: none; color: #f1e8da; font-weight: 700; }
.pf-since { margin: 0; text-align: center; font-size: 13px; color: #b6a996; }
.pf-since[hidden] { display: none; }
.modal-card.profile #pf-go { min-height: 48px; border-radius: 12px; background: #c9a45c; color: #1b1524; font-size: 16px; font-weight: 800; }
.modal-card.profile #pf-go::after { content: '\2192'; margin-left: 8px; }
.modal-card.profile .pf-report { position: static; align-self: center; }

/* 손으로 직접 하기: 화면을 강아지에게 가까이 가져간 동안 안내와 그만하기, 손가락 빛 */
#hud > #hands { position: absolute; inset: 0; pointer-events: none; }
#hands-tip { position: absolute; left: 50%; top: calc(56px + env(safe-area-inset-top)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); box-sizing: border-box; white-space: normal; overflow-wrap: break-word; text-align: center; line-height: 1.4; font-size: 14px; pointer-events: none; }
#hands-x { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); pointer-events: auto; min-height: 44px; padding: 0 20px; }
#hands-glow { position: absolute; left: -64px; top: -64px; width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle, rgba(42,34,53,0.95) 0%, rgba(255,232,170,.75) 22%, rgba(255,214,130,.35) 50%, rgba(255,200,120,0) 72%); filter: blur(3px); opacity: .6; transition: opacity .25s; will-change: transform; pointer-events: none; }
#hands-glow.on { opacity: .95; }
#hands-glow[hidden] { display: none; }
.spark { position: absolute; width: 9px; height: 9px; margin: -4px 0 0 -4px; border-radius: 50%; background: #352b44; box-shadow: 0 0 10px 3px rgba(255,225,150,.85); animation: sparkup 1.1s ease-out forwards; pointer-events: none; }
@keyframes sparkup { from { transform: translateY(0) scale(1); opacity: .95; } to { transform: translateY(-34px) scale(.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .spark { display: none; } }
body[data-hands] #actions, body[data-hands] #rounds, body[data-hands] #pills, body[data-hands] #joy, body[data-hands] #act-need, body[data-hands] #mission, body[data-hands] #tab-menu, body[data-hands] #hud-fb, body[data-hands] #hud-sky, body[data-hands] #dog-react, body[data-hands] #hud-fert { display: none !important; }

/* 위쪽 줄: 왼쪽은 이름과 비료, 오른쪽은 다른 섬과 메뉴 */
.hud-left { display: flex; gap: 5px; flex: 1 1 0; min-width: 0; align-items: center; }
#hud-fert { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
/* 모은 비료 앞에 똥 아이콘 */
#hud-fert::before { content: ""; flex: 0 0 22px; width: 22px; height: 22px; background: url("assets/icons/eden/poop.svg") center / contain no-repeat; pointer-events: none; }
/* 내 섬의 동그란 버튼은 2줄 2칸: 위 공·행동, 아래 부르기·사진 */
#rounds.two { grid-template-columns: repeat(2, 56px); }
/* 가로 화면(PC·가로 휴대폰): 아래 줄을 좁혀 마당이 덜 가리게 */
@media (min-aspect-ratio: 5/4) {
  #actions { left: calc(50% - min(33vw, 310px)); right: auto; width: min(66vw, 620px); }
  #actions .act { min-height: 46px; }
}

/* 나갈 때 한마디 */
#leave-ask { display: flex; flex-direction: column; gap: 4px; }
#leave-ask[hidden] { display: none; }
#leave-note { min-height: 60px; resize: vertical; }

/* 우리 아이에게 이야기하기: 집 앞 채팅 */
.talk-list { display: flex; flex-direction: column; gap: 5px; max-height: 44vh; overflow-y: auto; padding: 4px 2px; }
/* 강아지 댓글: 왼쪽 말풍선. 사람 말이 아니라 소리와 몸짓 */
.talk-dog { align-self: flex-start; max-width: 86%; background: #352b44; color: #b6a996; padding: 7px 11px; border-radius: 14px 14px 14px 4px; font-size: 14px; line-height: 1.4; }
.talk-dog b { color: #f1e8da; margin-right: 2px; }
.talk-dog.pop { animation: pill-pop .3s ease-out both; transform-origin: left center; }
/* 이야기 창은 아래쪽에 두고 뒤를 덜 가려 강아지가 움직이는 게 보인다 */
/* 이야기하기: 창은 아래쪽 절반만 쓰고 위쪽은 투명하게 두어 아이 얼굴이 보인다 */
#whisper-sheet { align-items: flex-end; background: transparent; }
#whisper-sheet .modal-card { max-height: 46vh; }
.talk-time { font-size: 11px; color: #b6a996; align-self: flex-end; margin-top: 4px; }
.talk-me { align-self: flex-end; max-width: 82%; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 14px 14px 4px 14px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; user-select: none; }
.talk-dog { align-self: flex-start; max-width: 82%; background: #352b44; color: #f1e8da; padding: 7px 12px; border-radius: 14px 14px 14px 4px; font-size: 14px; line-height: 1.4; }
.talk-row { display: flex !important; flex-direction: row !important; gap: 6px; }
.talk-row input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid #4a3f5a; border-radius: 10px; padding: 0 10px; font: inherit; font-size: 16px; background: #2a2235; color: #f1e8da; }
.talk-row .btn { flex: none; width: 76px; }
#hud-talk { white-space: nowrap; }
body[data-hands] #hud-talk, body[data-hands] #act-skip { display: none !important; }

/* 콘테스트 입구와 사진 문구는 작은 화면에서도 잘리지 않는다. */
#sky-contest { flex: none; }
/* 위 줄은 한 줄로. 이름이 길면 이름 쪽이 줄어든다 */
#hud .hud-right { flex: none; }
#photo-caption { resize: vertical; min-height: 72px; flex-shrink: 0; }
#photo-sheet .modal-card > button, #photo-sheet .modal-card > label, #photo-sheet .modal-card > p { flex-shrink: 0; }

/* 개인 소식 휴대폰 인증: 작은 화면에서도 입력칸이 카드 밖으로 나가지 않는다. */
#pet-channel-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#pet-channel-form label { display: block; min-width: 0; }
#pet-channel-phone, #pet-channel-pin { display: block; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; border: 1px solid #4a3f5a; border-radius: 10px; padding: 10px 12px; font: inherit; background: #2a2235; color: #f1e8da; }
#pet-channel-settings small { line-height: 1.5; overflow-wrap: anywhere; }

/* 우리 아이 관리: 생일과 무지개 다리 건넌 날 */
.mg-dates { display: flex; gap: 8px; }
.mg-date { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #b6a996; }
.mg-date input { width: 100%; box-sizing: border-box; }
.mg-hint { margin: 2px 0 8px; font-size: 13px; line-height: 1.4; color: #b6a996; }
/* 우리 아이 관리: 네 묶음. 제목 줄을 누르면 그 묶음만 펼쳐진다 */
/* flex: none — 창이 세로 flex라 묶음이 눌려 2px로 줄어들던 것을 막고, 대신 창이 스크롤된다 */
.mg-group { flex: none; gap: 0 !important; border: 1px solid #4a3f5a; border-radius: 12px; overflow: hidden; }
.mg-head { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; padding: 0 14px; border: 0; background: #352b44; color: #f1e8da; font: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
.mg-head::after { content: ""; width: 8px; height: 8px; margin-right: 2px; border-right: 2px solid #7b756a; border-bottom: 2px solid #7b756a; transform: rotate(-45deg); transition: transform .15s; }
.mg-head[aria-expanded="true"]::after { transform: rotate(45deg); }
.mg-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.mg-body[hidden] { display: none; }
.mg-switch { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #4a3f5a; border-radius: 10px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mg-sw-label { flex: 1; text-align: left; }
.mg-sw-word { min-width: 24px; font-size: 12px; font-weight: 800; color: #b6a996; text-align: right; }
.mg-switch.on .mg-sw-word { color: #e2c48c; }
.mg-sw { position: relative; display: block; width: 38px; height: 22px; border-radius: 11px; background: #4a3f5a; transition: background .15s; }
.mg-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #2a2235; transition: transform .15s; }
.mg-switch.on .mg-sw { background: #c9a45c; }
.mg-switch.on .mg-sw::after { transform: translateX(16px); }
.mg-danger { display: flex; flex-direction: row; justify-content: center; gap: 18px; margin-top: 4px; }
/* 묶음 안의 태그 칸은 가로로 줄 바꿈 */
.mg-body > .tag-wrap { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }

#login-social { display: flex; flex-direction: column; gap: 10px; }
@font-face { font-family: 'Google Sans Signin'; src: url('assets/icons/auth/google-sans-signin.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
.google-login { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 4px; font: 500 14px/20px 'Google Sans Signin', Arial, sans-serif; cursor: pointer; }
.google-login img { width: 20px; height: 20px; flex: none; }
.google-login:hover { background: #f8faff; }
.google-login:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
/* 손으로 던지기 처음 안내: 손가락이 공 자리에서 위로 쓸어 올린다 */
#hands-swipe { position: absolute; left: 50%; top: 70%; width: 58px; height: 76px; margin: 6px 0 0 -18px; pointer-events: none; z-index: 3; animation: handsSwipe 1.7s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(60,40,25,.25)); }
#hands-swipe[hidden] { display: none; }
@keyframes handsSwipe { 0% { transform: translateY(30px); opacity: 0; } 15% { transform: translateY(18px); opacity: 1; } 65% { transform: translateY(-120px); opacity: 1; } 100% { transform: translateY(-140px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #hands-swipe { animation: none; } }
/* 쓰다듬기 처음 안내: 손바닥 그림이 강아지 등 위에서 좌우로 쓰다듬는다 */
#hands-pet { position: absolute; left: 50%; top: 50%; width: 54px; height: 60px; margin: -40px 0 0 -27px; pointer-events: none; z-index: 3; animation: handsPet 1.6s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(60,40,25,.25)); }
#hands-pet[hidden] { display: none; }
@keyframes handsPet { 0% { transform: translate(-52px, 6px) rotate(-8deg); opacity: 0; } 12% { opacity: 1; } 50% { transform: translate(52px, -4px) rotate(8deg); opacity: 1; } 88% { opacity: 1; } 100% { transform: translate(-52px, 6px) rotate(-8deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #hands-pet { animation: none; } }

/* 내 창고: 수확물(작물·꽃씨·비료)과 수집물(털 뭉치·잎) */
/* 창 안의 칸을 세로로 쌓는 규칙(.modal-card > div)보다 앞서도록 창 이름을 붙인다 */
#store-sheet .modal-card > .store-tabs { flex-direction: row; gap: 6px; }
#store-sheet .store-tabs .store-tab { width: auto; flex: 1 1 0; }
.store-tab { flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 8px 6px; font-size: 14px; font-weight: 700; cursor: pointer; }
.store-tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.store-list { display: flex; flex-direction: column; gap: 8px; }
.store-empty-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.store-empty-slot { min-height: 72px; border: 1px dashed var(--line); border-radius: 14px; background: var(--paper); }

.store-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 4px 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.store-ico { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #4a3f5a; grid-row: span 2; background-color: #2a2235; background-size: 22px; background-position: center; background-repeat: no-repeat; }
.store-name { font-weight: 700; font-size: 15px; color: #f1e8da; }
.store-n { font-weight: 800; font-size: 16px; color: #f1e8da; }
.store-use { grid-column: 2 / 4; margin: 0; font-size: 12.5px; color: var(--soft); }
.store-act { grid-column: 2 / 4; justify-self: start; }
.store-empty { color: var(--soft); font-size: 14px; padding: 8px 2px; margin: 0; }

/* 우리 아이 사진첩: 관리 창의 사진 칸, 프로필의 작은 사진 줄, 크게 보기 창 */
#manage-sheet .mg-album { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.mg-album-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 14px; }
#manage-sheet .mg-album-head { flex-direction: row; }
#mg-album-n { color: var(--soft); font-weight: 600; font-size: 13px; }
#manage-sheet .mg-album-grid, #profile-sheet .pf-album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#manage-sheet .mg-album-grid:empty { display: none; }
#profile-sheet .pf-album { grid-template-columns: repeat(4, 1fr); }
#profile-sheet .pf-album[hidden] { display: none; }
/* 옛 사파리도 정사각형이 되도록 aspect-ratio 대신 아래 여백(가로 폭만큼)으로 높이를 만든다 */
.album-thumb { position: relative; height: 0; padding: 0 0 100% 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #352b44; cursor: pointer; }
.album-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-album-note { margin: 0; font-size: 12px; color: var(--soft); line-height: 1.45; }
#pv-img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; background: #352b44; touch-action: pan-y; user-select: none; -webkit-user-drag: none; }
#photo-view .modal-card > .pv-row { flex-direction: row; align-items: center; justify-content: space-between; }
.pv-row span { color: var(--soft); font-weight: 600; }
.pv-row .btn[hidden] { visibility: hidden; display: inline-flex; }

/* 프로필에서 옆 섬으로 넘기기: 사진 양옆 둥근 단추, 옆으로 밀면 다음·이전 섬 */
#profile-sheet .modal-card { touch-action: pan-y; }
#profile-sheet .pf-nav { position: absolute; top: 128px; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #2a2235; color: #f1e8da; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(40, 50, 35, 0.12); z-index: 2; }
#profile-sheet .pf-nav[hidden] { display: none; }
/* 목소리: 관리 창의 단추 줄과 프로필의 목소리 듣기 */
#manage-sheet .mg-voice-row { display: flex; flex-direction: row; flex-wrap: wrap; }
#manage-sheet .mg-voice-row[hidden] { display: none; }
#manage-sheet .mg-voice-row > * { flex: 1 1 auto; margin: 0 6px 6px 0; }
#profile-sheet .pf-voice { align-self: center; display: flex; flex-direction: row; align-items: center; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
#profile-sheet .pf-voice[hidden] { display: none; }
#manage-sheet #mg-family-url { flex: 3 1 160px; min-width: 0; font: inherit; font-size: 13px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #2a2235; }
#manage-sheet .mg-family-list { display: flex; flex-direction: column; }
#manage-sheet .mg-family-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; padding: 6px 2px; border-top: 1px solid var(--line); }
#manage-sheet .mg-family-row button { padding: 4px 12px; }
#profile-sheet .pf-voice img { margin-right: 6px; }
/* 창 안 칸을 세로로 쌓는 공통 규칙(.modal-card > div)을 이 줄만 가로로 바꾼다 */
#profile-sheet .pf-go-row { position: -webkit-sticky; position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: row; align-items: center; gap: 0; padding: 6px 0; background: #2a2235; }
#profile-sheet .pf-go-row .pf-nav { position: static; top: auto; flex: none; }
#profile-sheet .pf-go-row #pf-prev { margin-right: 10px; }
#profile-sheet .pf-go-row #pf-next { margin-left: 10px; }
#profile-sheet .pf-go-row #pf-go { flex: 1; min-width: 0; }
/* 프로필 사진 넘기기: 대표 그림 위에 올린 사진을 겹쳐 보여 주고, 사진 안쪽 작은 단추와 점으로 차례를 알린다 */
#profile-sheet .pf-photo-wrap { position: relative; width: 100%; max-width: 170px; align-self: center; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
#profile-sheet .pf-photo-wrap #pf-photo { display: block; width: 100%; max-width: none; height: auto; box-sizing: border-box; }
#profile-sheet #pf-shot { position: absolute; top: 0; left: 0; width: 100%; height: 100%; box-sizing: border-box; object-fit: cover; border: 4px solid #2a2235; border-radius: 18px; background: #352b44; }
#profile-sheet #pf-shot[hidden] { display: none; }
#profile-sheet .pf-ph-btn { position: absolute; bottom: 8px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(42,34,53,0.88); color: #f1e8da; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 4px rgba(40, 50, 35, 0.25); }
#profile-sheet .pf-ph-btn[hidden] { display: none; }
#profile-sheet .pf-ph-prev { left: 8px; }
#profile-sheet .pf-ph-next { right: 8px; }
#profile-sheet .pf-dots { display: flex; flex-direction: row; align-items: center; justify-content: center; align-self: center; width: auto; margin: 0; padding: 2px 0; }
#profile-sheet .pf-dots[hidden] { display: none; }
#profile-sheet .pf-dots span { display: block; flex: none; width: 7px; height: 7px; margin: 0 3px; padding: 0; border-radius: 50%; background: #4a3f5a; }
#profile-sheet .pf-dots span.on { background: #c9a45c; }
#profile-sheet .pf-prev { left: 14px; }
#profile-sheet .pf-next { right: 14px; }
/* 옆 섬으로 넘길 때: 창은 진한 그대로 두고 옆에서 살짝 밀려 들어온다(투명해지면 뒤 하늘이 비쳐 번쩍여 보였다) */
#profile-sheet .modal-card.pf-in-l { animation: pf-in-l 0.2s cubic-bezier(0.2, 0.7, 0.3, 1); }
#profile-sheet .modal-card.pf-in-r { animation: pf-in-r 0.2s cubic-bezier(0.2, 0.7, 0.3, 1); }
@keyframes pf-in-l { from { transform: translateX(-36px); } to { transform: none; } }
@keyframes pf-in-r { from { transform: translateX(36px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { #profile-sheet .modal-card.pf-in-l, #profile-sheet .modal-card.pf-in-r { animation: none; } }

/* 카카오톡 채널·소식은 한국어 화면에서만(문의 창의 채널 추가 단추와 안내, 소식 창의 카카오 부분, 메뉴의 카카오톡 소식) */
html[lang]:not([lang="ko"]) #fb-kakao-channel,
html[lang]:not([lang="ko"]) #fb-kakao-channel + .fb-note,
html[lang]:not([lang="ko"]) #pet-news-preparing,
html[lang]:not([lang="ko"]) #act-notify { display: none !important; }


/* ---- 한 화면 만들기 ---- */
#make-flow .make-card { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
#make-flow .make-title { margin: 0; text-align: center; }
#make-flow .make-sub { margin: 2px 0 6px; text-align: center; color: #b6a996; font-size: 14px; }
/* 만들기 창은 내용이 화면보다 길면 창 안에서 스크롤한다. 그런데 안의 칸들이 줄어들 수 있게 되어 있어, 내용이 길어지면(품종·털 색·이메일 칸이 늘어난 뒤) 맨 위 사진 칸이 높이 4픽셀의 점선 한 줄로 눌렸다(2026-11-16 사용자 화면). 칸은 줄이지 않고 창이 스크롤하게 한다 */
#make-flow .make-card > * { flex-shrink: 0; }
#make-flow .make-photo { align-self: center; width: 148px; height: 148px; padding: 0; border: 2px dashed #d9b98a; border-radius: 18px; background: #2a2235; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
#make-flow .make-photo.has { border: 3px solid #2a2235; box-shadow: 0 2px 10px rgba(58,42,24,.18); }
#make-flow .make-photo canvas { width: 100%; height: 100%; display: block; }
#make-flow .make-photo-empty { display: flex; flex-direction: column; align-items: center; color: #b6a996; font-weight: 700; font-size: 14px; }
#make-flow .make-photo-empty img { margin-bottom: 6px; }
/* 사진 없이 만나러 가기를 누르면 사진 칸을 흔들어 알려 준다 */
#make-flow .make-photo.need { border-color: #c9a45c; animation: make-need .5s ease; }
@keyframes make-need { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
/* 이메일 근황 신청 칸: 세로로 */
#pet-mail-form { display: flex; flex-direction: column; gap: 8px; }
#pet-mail-form > label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; color: #f1e8da; }
#pet-mail-form input[type="email"], #pet-mail-form input[type="text"] { width: 100%; border: 1px solid #4a3f5a; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: #2a2235; color: #f1e8da; }
#pet-mail-form small { color: #b6a996; }
#pet-mail-settings h3 { margin: 6px 0 0; }
#make-flow .make-extra-row { display: flex !important; flex-direction: row !important; align-items: center; justify-content: center; gap: 8px; }
#make-flow .make-extra-tip { font-size: 12.5px; color: #b6a996; }
#make-flow .make-extra { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1.5px dashed #d9b98a; border-radius: 10px; background: #2a2235 center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #b6a996; }
#make-flow .make-extra.has { border: 2px solid #2a2235; box-shadow: 0 1px 6px rgba(58,42,24,.2); align-items: flex-start; justify-content: flex-end; }
#make-flow .make-extra.has .make-extra-plus { width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: rgba(27,21,36,0.6); color: #fff; font-size: 13px; line-height: 18px; text-align: center; }
#make-flow .make-label { margin: 8px 0 0; font-weight: 800; font-size: 14px; color: #f1e8da; text-align: left; }
#make-flow .make-kind { display: flex; flex-direction: row; }
#make-flow .make-kind-btn { flex: 1 1 0; margin-right: 8px; padding: 12px 0; border: 1.5px solid var(--line); border-radius: 14px; background: #2a2235; font: inherit; font-weight: 800; color: #f1e8da; cursor: pointer; }
#make-flow .make-kind-btn:last-child { margin-right: 0; }
#make-flow #make-species { margin-top: 8px; }
#make-flow #make-species[hidden] { display: none; }
#make-flow .make-kind-btn.on { border-color: #c9a45c; background: #2a2235; color: #e2c48c; }
#make-flow .make-note { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: #b6a996; text-align: left; }
.make-flag { display: flex; flex-direction: row; align-items: center; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: #2a2235; }
.make-flag img { flex: 0 0 auto; margin-right: 10px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.make-flag span { flex: 1 1 auto; font-weight: 700; font-size: 14px; color: #f1e8da; text-align: left; }
.mg-shelf-dots { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 150px; }
.mg-shelf-dot { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); cursor: pointer; }
.mg-shelf-dot.on { border-color: #c9a45c; outline: 2px solid #c9a45c; outline-offset: 2px; }
.mg-shelf-dots .mg-chip { width: auto; min-width: 26px; height: 26px; padding: 0 9px; border-radius: 13px; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 22px; color: #f1e8da; background: #352b44; }
.mg-shelf-dots .mg-chip.on { background: #c9a45c; color: #fff6e8; outline: 0; border-color: #c9a45c; }
.mpe-switch { flex: 0 0 auto; position: relative; width: 50px; height: 30px; padding: 0; border: 0; border-radius: 15px; background: #4a3f5a; cursor: pointer; transition: background .15s; }
.mpe-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #2a2235; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.mpe-switch.on { background: #c9a45c; }
.mpe-switch.on::after { transform: translateX(20px); }
#make-flow .make-more { margin-top: 8px; padding: 12px; border: 0; border-radius: 14px; background: #352b44; font: inherit; font-weight: 700; color: #b6a996; cursor: pointer; }
#make-flow .make-more-box { display: flex; flex-direction: column; }
#make-flow .make-more-box[hidden] { display: none; }
#make-flow .make-foot { margin: 4px 0 0; text-align: center; font-size: 12px; color: #b6a996; }
#make-flow #make-mail-box[hidden], #make-flow .make-flag[hidden] { display: none; }
#make-flow .make-login-box { gap: 6px; }
#make-flow .make-login-box[hidden] { display: none; }
#make-flow .make-login-box .kakao { min-height: 44px; border-radius: 4px; font-size: 14px; }
#manage-sheet .mg-flag { margin: 6px 0 2px; }
#profile-sheet .pf-name-row { display: flex; flex-direction: row; align-items: center; justify-content: center; }
#profile-sheet .pf-flag { margin-right: 8px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
#profile-sheet .pf-flag[hidden] { display: none; }
/* ---- 사진 맞추기 ---- */
.crop-sheet { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 13; display: flex; flex-direction: column; background: #1b1524; color: #fff; padding: calc(14px + env(safe-area-inset-top)) 0 calc(14px + env(safe-area-inset-bottom)); }
.crop-sheet[hidden] { display: none; }
.crop-head { text-align: center; padding: 0 16px 10px; }
.crop-head h2 { margin: 0; font-size: 19px; color: #fff; }
.crop-head p { margin: 4px 0 0; font-size: 13px; color: #e8dcc6; }
.crop-stage { position: relative; flex: 1 1 auto; overflow: hidden; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.crop-stage canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.crop-frame { position: absolute; border: 3px solid #f6c453; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(27,21,36,0.55); pointer-events: none; box-sizing: border-box; }
.crop-zoom { display: flex; flex-direction: row; align-items: center; padding: 14px 16px 10px; }
.crop-zoom button { flex: 0 0 auto; width: 40px; height: 40px; border: 0; background: transparent; color: #fff; font-size: 26px; font-weight: 700; cursor: pointer; }
.crop-zoom input { flex: 1 1 auto; margin: 0 8px; accent-color: #f6c453; }
.crop-btns { display: flex; flex-direction: row; padding: 0 16px; }
.crop-btns .btn { flex: 1 1 0; margin: 0; }
.crop-btns .btn + .btn { flex: 1.6 1 0; margin-left: 10px; }
/* 창 안 칸을 세로로 쌓는 공통 규칙(.modal-card > div)보다 앞서도록 창 이름을 붙인다 */
#make-flow .make-kind, #make-flow .make-flag, #manage-sheet .make-flag { flex-direction: row; gap: 0; }
#make-flow #make-mail-box, #make-flow .make-more-box { gap: 6px; }
#make-flow input[type="email"] { width: 100%; border: 1px solid #4a3f5a; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: #2a2235; color: #f1e8da; box-sizing: border-box; }
.crop-btns .btn:not(.primary) { color: #f1e8da; }
#photo-sheet .photo-again { flex-direction: row; gap: 0; }
#photo-sheet .photo-again[hidden] { display: none; }
#photo-sheet .photo-again .btn { flex: 1 1 0; margin: 0; padding: 9px 6px; font-size: 13.5px; }
#photo-sheet .photo-again .btn + .btn { margin-left: 8px; }
.shutter-flash { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 14; background: #2a2235; pointer-events: none; animation: shutter-flash .4s ease-out forwards; }
@keyframes shutter-flash { from { opacity: .85; } to { opacity: 0; } }
/* 옆 섬 넘기기: 창 양옆, 화면 세로 가운데. 창 안 글 길이와 상관없이 같은 자리에 있다 */
#profile-sheet > .pf-nav { position: absolute; top: 50%; margin-top: -22px; z-index: 3; }
#profile-sheet > .pf-prev { left: 8px; left: max(8px, calc(50% - 300px)); }
#profile-sheet > .pf-next { right: 8px; right: max(8px, calc(50% - 300px)); }
@media (max-width: 539px) {
  #profile-sheet.nav-on .modal-card { width: calc(100% - 60px); }
  #profile-sheet > .pf-nav { width: 38px; height: 38px; margin-top: -19px; }
  #profile-sheet > .pf-prev { left: 4px; }
  #profile-sheet > .pf-next { right: 4px; }
}
/* 앱처럼: 화면 글자를 끌어서 고르지 못하게, 길게 눌러 뜨는 메뉴도 막는다. 글 쓰는 칸만 예외 */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; }

/* ---- 공유 카드·액자·영상 ---- */
.sh-card .sh-sub { margin: 0; font-size: 13px; line-height: 1.45; color: #b6a996; }
.sh-card .sh-sub[hidden] { display: none; }
.sh-card .sh-preview { display: flex; flex-direction: row; justify-content: center; }
.sh-card .sh-preview canvas { display: block; max-width: 100%; max-height: 46vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 2px 12px rgba(58,42,24,.18); }
.sh-card .sh-label { margin: 6px 0 0; font-weight: 800; font-size: 13.5px; color: #f1e8da; }
.sh-card .sh-chips, .sh-card .sh-photos { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0; padding-bottom: 2px; }
.sh-card .sh-size { justify-content: center; }
.sh-chip { flex: 0 0 auto; margin-right: 6px; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #2a2235; font: inherit; font-size: 13.5px; font-weight: 700; color: #f1e8da; cursor: pointer; white-space: nowrap; }
.sh-chip.on { border-color: #c9a45c; background: #2a2235; color: #e2c48c; }
.sh-chip:disabled { opacity: .45; }
.sh-ph { flex: 0 0 auto; width: 56px; height: 56px; margin-right: 6px; padding: 0; border: 2px solid var(--line); border-radius: 10px; background: #352b44; overflow: hidden; font: inherit; font-size: 12px; font-weight: 700; color: #b6a996; cursor: pointer; }
.sh-ph.on { border-color: #c9a45c; box-shadow: 0 0 0 2px #352b44; }
.sh-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-card .sh-row { display: flex; flex-direction: row; gap: 0; }
.sh-card .sh-row .btn { flex: 1 1 0; margin: 0; }
.sh-card .sh-row .btn + .btn { margin-left: 8px; }
.sh-card .sh-row .btn[hidden] { display: none; }
.sh-card .sh-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sh-card .sh-apps .btn { margin: 0; padding: 9px 4px; font-size: 13.5px; }
.sh-card #fr-go { text-align: center; text-decoration: none; }
.sh-card #fr-go.off { opacity: .55; }
.sh-card .vd-video { width: 100%; max-height: 60vh; border-radius: 12px; background: #1b1524; }
#rd-video[hidden] { display: none; }
#rd-video.rec { background: rgba(196,52,46,.9); border-color: #2a2235; }
#rd-video.rec svg { animation: rec-blink 1s steps(2, start) infinite; }
@keyframes rec-blink { to { visibility: hidden; } }
/* 창 안 칸을 세로로 쌓고 줄이는 공통 규칙(.modal-card > div)보다 앞서도록 창 이름을 붙인다: 고르기 줄은 가로로, 줄어들지 않게 */
#share-sheet .sh-chips, #share-sheet .sh-photos { display: flex; flex-direction: row; flex-wrap: nowrap; flex-shrink: 0; overflow-x: auto; gap: 0; }
#share-sheet .sh-size { justify-content: center; }
#frame-sheet .sh-chips { display: flex; flex-direction: row; flex-wrap: wrap; flex-shrink: 0; gap: 0; }
#frame-sheet .sh-chip { margin-bottom: 6px; }
#share-sheet .sh-preview { flex-direction: row; flex-shrink: 0; }
#share-sheet .sh-row, #video-sheet .sh-row { display: flex; flex-direction: row; flex-shrink: 0; gap: 0; }
#share-sheet .sh-apps { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 6px; gap: 6px; flex-shrink: 0; }
/* 녹화 중: 빨간 동그라미에 남은 초 */
#rd-video.rec { background: #c9a45c !important; border-color: #2a2235 !important; color: #1b1524 !important; }
#rd-video.rec span { color: #fff !important; font-weight: 800; }
#hud #rd-video::before { content: ""; display: inline-block; width: 23px; height: 23px; flex: 0 0 23px; pointer-events: none; background: url("assets/icons/eden/video.svg") center/contain no-repeat; }
#hud #rd-video.rec::before { animation: rec-blink 1s steps(2, start) infinite; }

/* Localized ISO date fields remain legible on small phones. */
.mg-dates { flex-direction: column; gap: 12px; }
.date-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; }
.date-fields select { min-width: 0; width: 100%; padding: 10px 6px; border: 1px solid #4a3f5a; border-radius: 10px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 16px; }

/* ---- 무료 선물 ---- */
/* 프로필 창의 받은 선물 줄 */
.modal-card.profile .pf-gifts { gap: 6px; padding: 10px; border-radius: 14px; background: #352b44; }
.pf-gifts-h { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #f1e8da !important; }
.pf-gifts-h b { margin-left: auto; font-size: 16px; }
.pf-gift-row { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 6px !important; }
.pf-gift-chip { position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: #2a2235; cursor: pointer; padding: 0; }
.pf-gift-flag { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 13px; border-radius: 2px; box-shadow: 0 0 0 1.5px #2a2235, 0 0 0 2.5px rgba(58,50,32,.2); object-fit: cover; }
.pf-gift-cap, .pf-gift-empty { font-size: 13px !important; }
.pf-gift-btn { gap: 6px; }
.pf-gift-btn[hidden] { display: none; }
.pf-gift-btn:disabled { opacity: .6; cursor: default; }

/* 선물 고르기 창 */
.gift-card .gift-sub { font-size: 13px; }
.modal-card > .gift-kinds { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px; }
/* 선물 갈래 탭 */
.modal-card > .gift-cats { display: flex !important; flex-direction: row !important; gap: 6px; margin: 2px 0 4px; }
.gift-cat { flex: 1 1 0; padding: 7px 4px; border: 1.5px solid var(--line); border-radius: 999px; background: #2a2235; font: inherit; font-size: 13px; font-weight: 700; color: #f1e8da; cursor: pointer; }
.gift-cat.on { background: #c9a45c; color: #1b1524; border-color: #c9a45c; }
/* 선물 창의 유료 탭과 유료 선물 칸 */
.gift-cat-paid { border-color: #c9a45c; color: #e2c48c; }
.gift-cat[hidden] { display: none; }
.gift-kind-paid .gift-price { font-size: 12px; font-weight: 800; color: #e2c48c; }
.gift-kind { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 6px; border: 2px solid transparent; border-radius: 12px; background: #352b44; cursor: pointer; font: inherit; font-size: 12px; color: #f1e8da; line-height: 1.2; word-break: keep-all; }
.gift-kind.on { border-color: #c9a45c; background: #352b44; }
.modal-card > .gift-show { flex-direction: row !important; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: #352b44; }
.gift-preview { flex: 0 0 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.gift-about { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gift-about b { font-size: 16px; color: #f1e8da; }
.gift-about p { font-size: 13px !important; }
.gift-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.gift-colors[hidden] { display: none; }
.gift-color { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #c9a45c; box-shadow: inset 0 0 0 2px #2a2235; cursor: pointer; padding: 0; }
.gift-color.on { box-shadow: inset 0 0 0 2px #2a2235, 0 0 0 3px #f6d793; }
.gift-note-l { font-size: 13px; color: #b6a996; }
/* 별로 가기 물음 창의 그림(그 아이와 마당) */
.island-ask-img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 14px; margin: 0 0 12px; background: #3a3048; }
.island-ask-img[hidden] { display: none; }
.modal-card > .gift-acts { flex-direction: row !important; gap: 8px; }
.gift-acts .btn { flex: 1; }

/* 도착한 선물 상자: 열면 뚜껑이 올라가며 사라지고 선물이 커지며 나온다 */
.gift-open-card { align-items: center; text-align: center; }
.go-count { font-size: 13px !important; color: #e2c48c !important; font-weight: 700; }
.modal-card > .go-box { align-items: center; animation: go-wobble 1.6s ease-in-out infinite; }
.go-box .go-lid { transform-origin: 60px 47px; transition: transform .45s ease-in, opacity .45s ease-in; }
.go-box.open { animation: none; }
.go-box.open .go-lid { transform: translateY(-30px) rotate(-14deg); opacity: 0; }
.modal-card > .go-item { align-items: center; animation: go-pop .45s ease-out; }
.go-from { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; color: #f1e8da !important; }
.go-flag { border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(58,50,32,.25); }
.go-note { margin: 0; padding: 8px 12px; border-radius: 12px; background: #352b44; color: #f1e8da; font-size: 15px; }
.gift-open-card #go-btn { align-self: stretch; }
.go-later { border: 0; background: none; color: #b6a996; font: inherit; font-size: 14px; padding: 6px; cursor: pointer; }
@keyframes go-wobble { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-4deg); } 20% { transform: rotate(4deg); } 30% { transform: rotate(0); } }
@keyframes go-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .modal-card > .go-box, .modal-card > .go-item { animation: none; } .go-box .go-lid { transition: none; } }

/* ---- 아이 소개 창 개편(2026-11-10): 바깥 테두리 없음, 뒤 흐림, 큰 사진, 나무 이름판, 선물 섬 ---- */
#profile-sheet { background: rgba(28,44,48,.3); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.modal-card.profile { border: 0; box-shadow: 0 10px 30px rgba(29,58,54,.16); }
/* 사진은 창 폭 가득. 낮은 화면에서는 화면 높이의 절반을 넘지 않게 한다 */
#profile-sheet .pf-photo-wrap { max-width: min(100%, 46vh); }
#profile-sheet .pf-photo-wrap #pf-photo, #profile-sheet #pf-shot { box-shadow: 0 3px 12px rgba(58,42,24,.16); }
#profile-sheet .pf-dots { display: none; }
.pf-ph-cnt { position: absolute; top: 12px; right: 12px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: rgba(27,21,36,0.55); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-ph-cnt[hidden] { display: none; }
/* 이름판이 사진 아래쪽을 가리므로 사진 넘기기 단추를 그 위로 올린다 */
#profile-sheet .pf-ph-btn { bottom: 38px; width: 32px; height: 32px; }
.modal-card.profile .pf-plate { align-self: center; position: relative; z-index: 2; box-sizing: border-box; min-width: 70%; max-width: 100%; margin-top: -36px; padding: 5px; border-radius: 12px; background: linear-gradient(180deg, #c9a45c, #c9a45c); box-shadow: 0 4px 10px rgba(58,42,24,.25); }
.modal-card.profile .pf-plate-in { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 16px 9px; border-radius: 8px; border: 2px solid #e6d3ae; background: #352b44; }
.modal-card.profile .pf-plate h2 { margin: 0; font-size: 23px; line-height: 1.2; color: #f1e8da; overflow-wrap: anywhere; }
.modal-card.profile .pf-plate #pf-meta { font-size: 13px; font-weight: 600; color: #b6a996; }
.modal-card.profile .pf-plate #pf-meta:empty { display: none; }
.modal-card.profile #pf-note { margin: 2px 0 0; border-radius: 12px; border: 1px dashed #4a3f5a; background: #2a2235; color: #f1e8da; font-size: 14px; }
/* 창 안의 div를 세로로 쌓는 기본 규칙보다 앞서야 해서 창 id로 지정한다 */
#profile-sheet .pf-tags { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; }
#profile-sheet .pf-tags[hidden] { display: none; }
.pf-tags span { padding: 4px 10px; border-radius: 999px; background: #2a2235; color: #f1e8da; font-size: 12.5px; font-weight: 700; }
.modal-card .pf-sec-h { margin: 0; text-align: left; font-size: 12.5px; font-weight: 800; color: #b6a996; }
.pf-island { display: block; width: 100%; height: 190px; border-radius: 14px; background: linear-gradient(180deg, #352b44, #2a2235 70%, #352b44); touch-action: pan-y; cursor: grab; }
.pf-island[hidden] { display: none; }
#profile-sheet .pf-links { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 14px; }
#profile-sheet .pf-links .pf-voice { align-self: auto; min-height: 32px; padding: 4px 2px; border: 0; border-radius: 0; background: none; font-size: 13px; font-weight: 600; color: #b6a996; }
#profile-sheet .pf-links .pf-voice img { width: 15px; height: 15px; margin-right: 4px; }
/* Generated badge text must also follow the selected page language. */
html[lang="ko"] { --eden-new-label: "새소식"; }
html[lang="ja"] { --eden-new-label: "新着"; }
html[lang="zh-Hant"], html[lang="zh-TW"], html[lang="zh-HK"] { --eden-new-label: "最新"; }
/* 소개 창 다듬기: 단추 없는 아래 줄 숨김, 옛 대표 사진은 작게, 스크롤 막대는 가늘게 */
#profile-sheet .pf-go-row[hidden] { display: none; }
#profile-sheet .pf-photo-wrap.pf-lowres { max-width: 200px; }
#profile-sheet .modal-card { scrollbar-width: thin; scrollbar-color: #4a3f5a transparent; }
#profile-sheet .modal-card::-webkit-scrollbar { width: 8px; }
#profile-sheet .modal-card::-webkit-scrollbar-track { background: transparent; margin: 18px 0; }
#profile-sheet .modal-card::-webkit-scrollbar-thumb { background: #4a3f5a; border-radius: 4px; }
#profile-sheet .modal-card::-webkit-scrollbar-button { display: none; }
/* ---- 아이 소개는 창이 아니라 화면 전체로, 내리지 않고 한 화면에서 다 보이게 한다(2026-11-10).
   하늘 배경 위에 이름·액자 사진·양옆 구름 위 선물·아래 단추 줄. 액자 크기는 남는 높이에 맞춰 코드(fitProfile)가 정한다.
   내용이 아주 많아 그래도 넘칠 때만 화면이 위아래로 움직인다 ---- */
#profile-sheet { display: block; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin;
  background: linear-gradient(180deg, #6fb4e6 0%, #b4e0ee 46%, #2a2235 84%, #352b44 100%); }
#profile-sheet .modal-card, #profile-sheet.nav-on .modal-card { position: relative; box-sizing: border-box; width: 100%; max-width: 520px; min-height: 100%; max-height: none; margin: 0 auto; padding: 0 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); gap: 6px; overflow: visible; border: 0; border-radius: 0; box-shadow: none; background: none; text-align: center; }
#profile-sheet .modal-card > * { position: relative; z-index: 1; }
#profile-sheet .modal-card > .pf-ground { position: absolute; z-index: 0; left: 0; right: 0; top: 60%; bottom: 0; display: block; pointer-events: none; }
#profile-sheet .pf-ground svg { display: block; width: 100%; height: 100%; }
#profile-sheet .modal-card.profile .pf-top { box-sizing: border-box; padding: 8px 0 0; padding-top: calc(8px + env(safe-area-inset-top)); }
#profile-sheet .modal-card .pf-x { width: 40px; min-width: 40px; height: 40px; min-height: 40px; border: 0; background: #2a2235; color: #f1e8da; box-shadow: 0 2px 8px rgba(60,80,110,.22); }
#profile-sheet .pf-badge { background: rgba(42,34,53,0.7); color: #f1e8da; }
/* 맨 위 이름과 한마디 */
#profile-sheet .pf-head { display: flex; flex-direction: column; align-items: center; flex: none; gap: 2px; padding: 0 44px; }
.modal-card.profile #pf-title { margin: 0; max-width: 100%; font-size: 30px; line-height: 1.15; font-weight: 800; color: #e2c48c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-card.profile .pf-meta-row { display: flex; flex-direction: row; align-items: center; justify-content: center; margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: #f1e8da; }
.modal-card.profile .pf-meta-row #pf-meta { font-size: 15px; color: #f1e8da; }
.modal-card.profile #pf-note { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #f1e8da; font-size: 14px; font-weight: 600; line-height: 20px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.modal-card.profile #pf-note[hidden] { display: none; }
/* 액자와 양옆 선물 */
#profile-sheet .pf-hero { display: flex; flex-direction: column; flex: none; gap: 0; }
#profile-sheet .pf-stage { position: relative; display: flex; flex-direction: column; }
#profile-sheet .pf-photo-wrap { box-sizing: border-box; width: 100%; padding: 10px; border-radius: 8px; background: linear-gradient(135deg, #f3dfb4, #e2c48c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), inset 0 0 0 9px rgba(160,120,60,.08), 0 8px 18px rgba(70,60,30,.28); }
#profile-sheet .pf-photo-wrap #pf-photo { border: 0; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(90,70,30,.2); }
#profile-sheet #pf-shot, #profile-sheet .pf-ghost { top: 10px; left: 10px; width: calc(100% - 20px); height: calc(100% - 20px); border: 0; border-radius: 3px; box-shadow: none; }
/* 사진이 저절로 넘어갈 때 앞 사진을 위에 겹쳐 두었다가 서서히 지운다 */
.pf-ghost { position: absolute; box-sizing: border-box; object-fit: cover; background: #352b44; opacity: 1; transition: opacity .9s ease; pointer-events: none; }
.pf-ghost.out { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .pf-ghost { transition: none; } }
#profile-sheet .pf-ph-cnt { display: none; }
.modal-card.profile .pf-gifts { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: block; padding: 0; border-radius: 0; background: none; pointer-events: none; }
.modal-card.profile .pf-gifts[hidden] { display: none; }
.modal-card.profile .pf-island, .modal-card.profile .pf-gifts-h, .modal-card.profile .pf-gift-empty { display: none !important; }
.modal-card.profile .pf-gift-row { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: grid !important; grid-template-columns: 52px 1fr 52px; grid-auto-rows: 58px; align-content: center; gap: 6px 0 !important; overflow: hidden; }
.modal-card.profile .pf-gift-chip { grid-column: 1; width: 52px; height: 56px; padding: 0 0 10px; border-radius: 0; background: none; pointer-events: auto; }
.modal-card.profile .pf-gift-chip:nth-child(even) { grid-column: 3; }
.modal-card.profile .pf-gift-chip::before { content: ''; position: absolute; left: 3px; right: 3px; bottom: 2px; height: 16px; border-radius: 50%; background: #2a2235; box-shadow: -11px -5px 0 -3px #2a2235, 11px -5px 0 -3px #2a2235, 0 3px 6px rgba(70,100,140,.22); }
.modal-card.profile .pf-gift-chip svg { position: relative; width: 38px; height: 38px; }
.modal-card.profile .pf-gift-flag { right: 2px; bottom: 6px; }
.modal-card.profile .pf-gift-cap { position: absolute; left: 50%; bottom: 18px; -webkit-transform: translateX(-50%); transform: translateX(-50%); max-width: 70%; padding: 4px 10px; border-radius: 999px; background: rgba(27,21,36,0.6); color: #fff !important; font-size: 12px !important; line-height: 1.35; pointer-events: none; }
.modal-card.profile .pf-gift-cap[hidden] { display: none; }
.modal-card.profile .pf-plate { align-self: center; min-width: 0; max-width: 86%; margin-top: -14px; padding: 3px; border-radius: 12px; background: linear-gradient(180deg, #f0dcae, #dcc08a); box-shadow: 0 4px 8px rgba(70,60,30,.25); }
.modal-card.profile .pf-plate-in { padding: 4px 18px 5px; border: 0; border-radius: 9px; background: #352b44; }
.modal-card.profile .pf-plate h2 { font-size: 17px; line-height: 1.25; color: #e2c48c; }
#profile-sheet .pf-ph-row { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 0; min-height: 34px; margin-top: 6px; }
#profile-sheet .pf-ph-btn { position: static; flex: none; width: 34px; height: 34px; background: #2a2235; color: #f1e8da; box-shadow: 0 2px 6px rgba(70,60,30,.25); }
#profile-sheet .pf-dots { display: flex; margin: 0 14px; padding: 0; }
#profile-sheet .pf-dots[hidden] { display: none; }
#profile-sheet .pf-dots span { width: 8px; height: 8px; margin: 0 4px; background: #2a2235; box-shadow: 0 0 0 1px rgba(90,110,60,.18); }
#profile-sheet .pf-dots span.on { background: #c9a45c; }
/* 아래: 받은 수(내 섬), 놀러 가기, 단추 줄 */
#profile-sheet .pf-body { display: flex; flex-direction: column; flex: 1 1 auto; justify-content: flex-end; gap: 8px; min-width: 0; }
.modal-card.profile .pf-stats { display: none !important; align-self: center; padding: 4px 10px; border-radius: 999px; background: rgba(42,34,53,0.92); }
.modal-card.profile.pf-own .pf-stats { display: flex !important; }
.modal-card.profile .pf-stats div { flex: none; flex-direction: row; gap: 5px; padding: 2px 10px; }
.modal-card.profile .pf-stats img { width: 20px; height: 20px; }
.modal-card.profile .pf-stats b { font-size: 14px; }
#profile-sheet .pf-go-row { position: static; justify-content: center; padding: 0; background: none; }
#profile-sheet .pf-go-row #pf-go { flex: none; min-width: 62%; min-height: 44px; padding: 0 22px; border-radius: 22px; background: #c9a45c; color: #1b1524; box-shadow: 0 4px 10px rgba(60,90,30,.28); }
.modal-card.profile .pf-acts { padding: 6px 8px; border-radius: 26px; background: #2a2235; box-shadow: 0 4px 14px rgba(60,80,110,.22); gap: 2px; }
.modal-card.profile .pf-acts .btn { position: relative; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 54px; padding: 4px 2px; gap: 3px; border: 0; border-radius: 18px; background: none; color: #f1e8da; font-size: 12px; font-weight: 700; line-height: 1.15; white-space: normal; }
.modal-card.profile .pf-acts .btn img { flex: none; width: 28px; height: 28px; }
.modal-card.profile .pf-acts .btn[hidden] { display: none; }
.modal-card.profile .pf-acts .btn:disabled { opacity: .7; }
/* 이미 꽃을 놓았거나 촛불을 켠 자리(care-once.js): 단추를 금빛으로 눌린 모양으로 */
.modal-card.profile .pf-acts .btn.given { background: rgba(226,196,140,.14); color: #e2c48c; }
.modal-card.profile .pf-acts .pf-n { position: absolute; top: 0; left: 50%; margin-left: 7px; min-width: 18px; height: 18px; box-sizing: border-box; padding: 0 5px; border-radius: 9px; background: #ee8fa0; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
/* 소개 칸: 단추 줄 위로 올라오는 칸 */
#profile-sheet .modal-card > .pf-more { position: absolute; z-index: 6; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); box-sizing: border-box; max-height: 72%; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-radius: 22px; background: #2a2235; box-shadow: 0 8px 28px rgba(40,60,90,.35); text-align: center; }
#profile-sheet .modal-card > .pf-more[hidden] { display: none; }
#profile-sheet .pf-more-head { display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
#profile-sheet .pf-more-head b { font-size: 16px; color: #f1e8da; }
#profile-sheet .pf-more-head .pf-x { width: 34px; min-width: 34px; height: 34px; min-height: 34px; box-shadow: none; background: #352b44; }
#profile-sheet .pf-tags { max-height: none; }
.pf-tags span { line-height: 17px; }
/* 옆 섬 넘기기 단추는 이름 양옆에 둔다(자리는 코드가 맞춘다) */
#profile-sheet > .pf-nav { width: 38px; height: 38px; margin-top: -19px; border: 0; background: #2a2235; box-shadow: 0 2px 8px rgba(60,80,110,.22); }
#profile-sheet > .pf-prev { left: max(8px, calc(50% - 252px)); }
#profile-sheet > .pf-next { right: max(8px, calc(50% - 252px)); }
@media (max-width: 539px) {
  #profile-sheet.nav-on .modal-card { width: 100%; }
  #profile-sheet > .pf-prev { left: 8px; }
  #profile-sheet > .pf-next { right: 8px; }
}
/* 옆 섬 넘기기 단추: 화면 양옆 세로 가운데에 붙은 얇은 손잡이 */
#profile-sheet > .pf-nav { top: 50%; width: 30px; height: 60px; margin-top: -30px; border: 0; background: rgba(42,34,53,0.82); box-shadow: 0 2px 8px rgba(60,80,110,.2); }
#profile-sheet > .pf-prev, #profile-sheet > .pf-prev { left: 0; border-radius: 0 16px 16px 0; }
#profile-sheet > .pf-next, #profile-sheet > .pf-next { right: 0; border-radius: 16px 0 0 16px; }
@media (min-width: 560px) {
  #profile-sheet > .pf-prev { left: calc(50% - 280px); border-radius: 16px; }
  #profile-sheet > .pf-next { right: calc(50% - 280px); border-radius: 16px; }
}
/* 아래 단추 줄은 작게, 가운데에 모은다 */
#profile-sheet .modal-card.profile .pf-acts { align-self: center; max-width: 100%; padding: 4px 8px; border-radius: 28px; gap: 0; }
#profile-sheet .modal-card.profile .pf-acts .btn { flex: 0 1 auto; min-width: 54px; min-height: 50px; padding: 3px 7px; gap: 2px; font-size: 11.5px; font-weight: 700; }
#profile-sheet .modal-card.profile .pf-acts .btn img { width: 26px; height: 26px; }
#profile-sheet .modal-card.profile .pf-acts .pf-n { top: -2px; margin-left: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10.5px; line-height: 16px; }
/* 방명록 칸 */
#profile-sheet .pf-guest-write { display: flex; flex-direction: column; gap: 6px; }
#profile-sheet .pf-guest textarea { box-sizing: border-box; width: 100%; min-height: 58px; padding: 9px 11px; border: 1px solid #4a3f5a; border-radius: 12px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 16px; line-height: 1.4; resize: none; }
#profile-sheet .pf-guest .pf-guest-fine { margin: 0; font-size: 12.5px; color: #b6a996; }
#profile-sheet .pf-guest .btn.primary { min-height: 44px; border-radius: 14px; }
#profile-sheet .pf-guest-list { display: flex; flex-direction: column; gap: 8px; text-align: left; }
#profile-sheet .pf-guest-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: #352b44; }
#profile-sheet .pf-guest-row p { margin: 0; }
#profile-sheet .pf-guest-who { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; color: #b6a996; }
#profile-sheet .pf-guest-who img { flex: none; border-radius: 2px; }
#profile-sheet .pf-guest-who b { color: #f1e8da; }
#profile-sheet .pf-guest-text { font-size: 14.5px; line-height: 1.45; color: #f1e8da; overflow-wrap: anywhere; }
#profile-sheet .pf-guest-row .pf-report-inline { align-self: flex-end; min-height: 26px; }
#profile-sheet .pf-thanks #pf-thanks-guest { min-height: 44px; border-radius: 14px; border: 1px solid #4a3f5a; background: #2a2235; color: #f1e8da; font-weight: 700; box-shadow: none; }
#profile-sheet .pf-thanks .btn[hidden], #profile-sheet .pf-thanks p[hidden] { display: none; }
#profile-sheet .modal-card.profile .pf-acts .btn { min-width: 48px; padding: 3px 5px; }
/* 감사 칸 */
#profile-sheet .pf-thanks p { margin: 0; font-size: 14px; line-height: 1.5; color: #f1e8da; }
#profile-sheet .pf-thanks .pf-thanks-line { font-size: 15.5px; font-weight: 800; color: #f1e8da; }
#profile-sheet .pf-thanks .btn.primary { min-height: 46px; border-radius: 14px; }
/* 입체 장면을 쓸 때: 섬·액자·이름판·선물은 장면이 그린다. 평면 것들은 자리만 차지하고 보이지 않는다 */
#profile-sheet .pf-scene { display: none; }
#profile-sheet.pf-3d .pf-scene { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; touch-action: none; cursor: grab; }
#profile-sheet.pf-3d.pf-long .pf-scene { touch-action: pan-y; }
/* 상자 장면 확대·축소 단추(2026-11-13): 오른쪽 아래, 아래 단추 줄 위 */
/* 로비 사람 창(2026-11-15): 화면 아래에서 올라오는 밝은 창. 이름, 누구를 보러 왔는지, 조용히 안아주기, 보러 가기 */
.pal-sheet { align-items: flex-end; padding: 0; background: rgba(20,14,28,.28); }
.pal-sheet .pal-card { position: relative; width: min(520px, 100%); border-radius: 22px 22px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom, 0px)); background: #f8f2e8; color: #3a2a1c; gap: 8px; text-align: center; }
.pal-sheet .pal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(58,42,28,.1); color: #3a2a1c; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pal-sheet .pal-name { margin: 0; font-size: 22px; font-weight: 800; color: #3a2a1c; }
.pal-sheet .pal-see { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #8a5a2a; }
.pal-sheet .pal-see[hidden], .pal-sheet .pal-go[hidden] { display: none; }
.pal-sheet .pal-hug { min-height: 50px; border: 0; border-radius: 999px; background: #c9824a; color: #fff; font-size: 16px; font-weight: 800; }
.pal-sheet .pal-note { margin: 2px 0 6px; font-size: 13px; line-height: 1.5; color: #7a6a58; }
.pal-sheet .pal-go { min-height: 46px; border: 1.5px solid rgba(58,42,28,.28); border-radius: 999px; background: transparent; color: #3a2a1c; font-size: 15px; font-weight: 800; }
/* 온기 표시: 화면 아래 가운데에서 잠깐 떠올랐다 사라진다 */
.warm-pill { position: fixed; left: 50%; bottom: 150px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: #fbe9c6; color: #4a3218; font-size: 14px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.28); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
.warm-pill i { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, #fff6d8 0, #f2a93b 70%); box-shadow: 0 0 8px #f2a93b; }
.warm-pill b { font-weight: 800; }
.warm-pill span { font-weight: 600; opacity: .75; }
.warm-pill.on { animation: warm-pop 2.4s ease both; }
@keyframes warm-pop { 0% { opacity: 0; transform: translate(-50%, 12px); } 12% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); } }
@media (prefers-reduced-motion: reduce) { .warm-pill.on { animation: none; opacity: 1; transform: translate(-50%, 0); } }
/* 사진 넘기기(2026-11-15 사용자 "사진 넘기기 < > 버튼이 안 보여"): 상자 화면 아래 가운데에 '‹ 2 / 5 ›'. 사진이 두 장 이상일 때만 보인다 */
#profile-sheet .pf-pager { display: none; }
#profile-sheet.pf-3d .pf-pager { display: flex; position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 2; align-items: center; gap: 12px; padding: 5px 6px; border-radius: 999px; background: rgba(27,21,36,.74); border: 1px solid rgba(255,255,255,.16); color: #f1e8da; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
#profile-sheet.pf-3d .pf-pager[hidden] { display: none; }
#profile-sheet .pf-pager button { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #f1e8da; color: #2a2235; display: flex; align-items: center; justify-content: center; cursor: pointer; }
#profile-sheet .pf-zoom { display: none; }
#profile-sheet.pf-3d .pf-zoom { display: flex; position: absolute; right: 14px; bottom: 150px; z-index: 1; flex-direction: column; gap: 10px; }
#profile-sheet.pf-3d .pf-zoom button { width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,250,240,.16); color: #fff6e8; font: 700 24px/1 sans-serif; cursor: pointer; }
#profile-sheet.pf-3d .modal-card { pointer-events: none; }
#profile-sheet.pf-3d .modal-card button, #profile-sheet.pf-3d .modal-card .pf-more, #profile-sheet.pf-3d .modal-card .pf-acts, #profile-sheet.pf-3d .modal-card details { pointer-events: auto; }
#profile-sheet.pf-3d .pf-ground { display: none; }
#profile-sheet.pf-3d .pf-photo-wrap, #profile-sheet.pf-3d .pf-plate, #profile-sheet.pf-3d .pf-gift-row { visibility: hidden; pointer-events: none; }
#profile-sheet.pf-3d .pf-gift-row .pf-gift-chip { pointer-events: none; }
/* 상자 장면에서는 사진 넘김 화살표를 두지 않는다(이름판을 가렸다, 2026-11-14 사용자). 사진은 액자를 누르면 사진첩에서 넘긴다 */
#profile-sheet.pf-3d .pf-ph-row { display: none; }
/* 화면 글자와 단추도 시안처럼: 큰 이름(영문은 세리프), 잎 무늬 한마디, 둥근 단추, 아래 단추 줄은 큰 그림과 짧은 글자 */
#profile-sheet .pf-badge { display: inline-block; margin-right: 8px; padding: 1px 9px; border-radius: 999px; background: rgba(42,34,53,0.85); color: #f1e8da; font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; font-size: 12px; font-weight: 700; line-height: 18px; }
#profile-sheet .pf-badge { flex: none; white-space: nowrap; }
#profile-sheet .pf-badge:empty { display: none; }
.modal-card.profile .pf-meta-row { flex-wrap: wrap; }
.modal-card.profile .pf-meta-row #pf-meta { white-space: nowrap; }
/* 내 섬의 받은 수 줄: 꽃·촛불·선물은 그림과 수만 보이고 글자는 화면 읽기용으로만 둔다 */
.modal-card.profile .pf-stats div img + span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.modal-card.profile .pf-stats div { position: relative; }
.modal-card.profile .pf-acts .btn.todo::after { content: ''; position: absolute; top: 4px; left: 50%; margin-left: 12px; width: 9px; height: 9px; border-radius: 50%; background: #ee8fa0; }
#profile-sheet .modal-card.profile .pf-top { justify-content: space-between; }
#profile-sheet .modal-card .pf-top .pf-x { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
.modal-card.profile #pf-title { font-family: Georgia, "Times New Roman", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; font-size: 38px; font-weight: 700; letter-spacing: -0.01em; }
.modal-card.profile .pf-meta-row, .modal-card.profile .pf-meta-row #pf-meta { font-family: Georgia, "Times New Roman", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; font-size: 17px; }
#profile-sheet .pf-head { margin-top: -30px; gap: 3px; }
#profile-sheet .pf-note-row { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; max-width: 100%; }
#profile-sheet .pf-note-row[hidden] { display: none; }
/* 소개 줄(상자 위): 작고 옅은 글자, 두 줄까지. 누르면(open) 다 보인다 */
#profile-sheet .pf-intro { margin: 2px 0 0; max-width: 100%; font-size: 13px; line-height: 1.45; color: #cdbfae; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
#profile-sheet .pf-intro.open { display: block; -webkit-line-clamp: unset; }
#profile-sheet .pf-intro[hidden] { display: none; }
#profile-sheet .pf-intro .pf-intro-tag { color: #e2c48c; }
#profile-sheet .pf-intro .pf-intro-sep { margin: 0 5px; opacity: .55; }
#profile-sheet .pf-intro b { font-weight: 600; color: #ddd0bf; }
#profile-sheet .pf-translate { margin: 4px 0 0; min-height: 28px; padding: 3px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.08); color: #f3e9dc; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
#profile-sheet .pf-translate[disabled] { opacity: .6; cursor: default; }
#profile-sheet .pf-translate[hidden] { display: none; }
/* 상자 주소(누르면 복사): 작고 옅은 금빛 글자 */
.leave-dev { display: block; margin: 2px 0 2px; font-size: 15px; color: #f1e8da; }
/* 주소 줄: 주소 글자와 복사 단추를 한 줄에 */
#profile-sheet .pf-addr-row { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 4px; margin: 3px 0 0; max-width: 100%; }
#profile-sheet .pf-addr-row[hidden] { display: none; }
#profile-sheet .pf-box-share { min-height: 32px; padding: 4px 16px; border: 1px solid rgba(226,196,140,.6); border-radius: 999px; background: rgba(226,196,140,.16); color: #f4e3bd; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
#profile-sheet .pf-addr-copy { flex: none; min-height: 26px; padding: 2px 11px; border: 1px solid rgba(226,196,140,.6); border-radius: 999px; background: rgba(226,196,140,.16); color: #f4e3bd; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
#profile-sheet .pf-addr { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 26px; padding: 2px 6px; border: 0; background: none; color: #e2c48c; font: inherit; font-size: 12px; letter-spacing: .2px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#profile-sheet .pf-addr[hidden] { display: none; }
#profile-sheet .pf-note-row img { flex: none; width: 18px; height: 18px; opacity: .8; }
#profile-sheet .pf-note-row img.flip { -webkit-transform: scaleX(-1); transform: scaleX(-1); }
.modal-card.profile #pf-note { font-size: 15px; font-weight: 700; }
#profile-sheet .pf-ph-btn { width: 38px; height: 38px; }
#profile-sheet .pf-dots span { width: 9px; height: 9px; }
#profile-sheet .pf-go-row #pf-go { min-width: 0; min-height: 38px; padding: 0 20px; border-radius: 19px; background: #2a2235; color: #f1e8da; font-size: 14px; border: 0; box-shadow: 0 3px 10px rgba(60,80,110,.22); }
.modal-card.profile .pf-acts { padding: 8px 10px; border-radius: 34px; }
.modal-card.profile .pf-acts .btn { min-height: 64px; gap: 4px; font-size: 13.5px; font-weight: 800; color: #f1e8da; }
.modal-card.profile .pf-acts .btn img { width: 34px; height: 34px; }
.modal-card.profile .pf-acts .pf-n { top: 0; margin-left: 9px; }
@media (max-height: 620px) {
  .modal-card.profile #pf-title { font-size: 30px; }
  .modal-card.profile #pf-note { -webkit-line-clamp: 1; }
}
/* 꽃·촛불 받은 수는 단추에 적지 않는다(섬 위 꽃·촛불 아래 숫자로만 보인다). 2026-11-10 사용자 요청 */
#profile-sheet #pf-b-flower, #profile-sheet #pf-b-candle { display: none; }
/* 공유 카드: 위의 카드 미리보기는 고정, 아래 고르는 칸만 위아래로 움직인다(2026-11-10 사용자 요청) */
#share-sheet .modal-card { overflow: hidden; }
#share-sheet .modal-card > .modal-head, #share-sheet .modal-card > .sh-sub, #share-sheet .modal-card > .sh-preview { flex: none; }
#share-sheet .sh-preview canvas { max-height: 34vh; }
#share-sheet .sh-opts { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; gap: 10px; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 2px 2px 4px; }
#share-sheet .sh-opts > * { flex-shrink: 0; }
#share-sheet .sh-size { justify-content: flex-start; }
#share-sheet .sh-more-btn { align-self: center; min-height: 36px; padding: 6px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
#share-sheet .sh-more { display: flex; flex-direction: column; gap: 10px; }
#share-sheet .sh-more[hidden] { display: none; }
#share-sheet .sh-more > * { flex-shrink: 0; }
#share-sheet .sh-foot { display: flex; flex-direction: row; flex: none; gap: 0; padding-top: 2px; }
#share-sheet .sh-foot .btn { flex: 1 1 0; min-width: 0; margin: 0; padding: 10px 4px; font-size: 14px; }
#share-sheet .sh-foot .btn + .btn { margin-left: 6px; }
#share-sheet .sh-foot .btn[hidden] { display: none; }
#share-sheet .sh-apps { grid-template-columns: repeat(3, 1fr); }
/* 공유 카드 고르는 칸: 이름표를 왼쪽에, 고를 것을 오른쪽에 두어 줄 높이를 줄인다 */
#share-sheet .sh-preview canvas { max-height: 31vh; }
#share-sheet .sh-opts, #share-sheet .sh-more { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 8px; }
#share-sheet .sh-more[hidden] { display: none; }
#share-sheet .sh-opts .sh-label { margin: 0; white-space: nowrap; }
#share-sheet .sh-opts > .sh-more-btn, #share-sheet .sh-opts > .sh-more, #share-sheet .sh-more > .sh-apps, #share-sheet .sh-more > .btn { grid-column: 1 / -1; }
#share-sheet .sh-opts > .sh-more-btn { justify-self: center; }
#share-sheet .sh-ph { width: 48px; height: 48px; }
/* 오른쪽 위는 공유 단추(2026-11-15). 소개·정보 적기·신고가 든 '더 보기'는 아래 단추 줄 끝에 둔다. 이름 아래 공유하기 줄은 감춘다(단추는 코드가 그대로 쓴다) */
#profile-sheet .pf-addr-row { display: none !important; }
#profile-sheet .modal-card .pf-x[hidden] { display: none; }
#profile-sheet .modal-card .pf-top-share { background: #c9a45c; color: #1b1524; }
/* 단추가 일곱 개까지 놓이므로 글자를 조금 줄인다. 한국어·중국어는 글이 짧아 한 줄로 둔다 */
.modal-card.profile .pf-acts .btn span { white-space: nowrap; font-size: 11px; letter-spacing: -0.02em; }
/* 단추 일곱 개(최소 폭 48)는 336px 인데 단추 줄 안쪽은 화면 폭 - 48px 라서, 폭 383 아래에서는 마지막 단추가 줄 밖으로 나갔다. 그 폭에서는 최소 폭을 줄 안쪽의 7분의 1로 낮춘다 */
@media (max-width: 383px) { #profile-sheet .modal-card.profile .pf-acts .btn { min-width: calc((100vw - 48px) / 7); } }
/* 좁은 휴대폰(폭 370 아래): 최소 폭을 풀고 글자를 조금 줄인다 */
@media (max-width: 370px) {
  #profile-sheet .modal-card.profile .pf-acts .btn { min-width: 0; }
  .modal-card.profile .pf-acts .btn span { font-size: 10px; letter-spacing: -0.04em; }
}
/* 한국어·중국어가 아닌 언어는 단추 글을 낱말 사이에서 줄을 바꿔 쓴다
   (2026-11-19 사용자가 영어 화면에서 글이 서로 겹친 단추 줄을 보내며 "영어는 2줄로 표현하자", "1줄이라 거시기하다").
   같은 날 코드 검토에서 나온 것을 고쳐, 글 모양이 아니라 단추 폭을 정하는 규칙을 바꿨다:
   - 단추는 가장 긴 낱말보다 좁아지지 않는다(min-width: auto). 전에는 48px 로 묶여 'compartilhar', 'Guestbook' 이 단추 밖으로 나가 옆 글과 붙었다.
   - 짧은 글의 단추가 폭을 내주므로 긴 글이 두 줄에 들어간다. 전에는 폭 375~393 에서 스페인어·베트남어·인도네시아어 글이 세 줄이 됐다.
   - 그림은 위에 붙인다(flex-start). 줄 수가 달라도 그림 줄이 가지런하고, 모든 글이 한 줄이면 빈 줄이 생기지 않는다.
   - 짧은 글의 단추가 너무 좁아지지 않게 글 칸에 최소 폭을 둔다(넓은 화면 44px, 좁은 화면은 줄 안쪽의 7분의 1에서 조금 뺀 값).
   - 낱말 중간에서는 끊지 않는다(overflow-wrap: normal. 베트남어는 다른 규칙이 button 에 anywhere 를 줘서 여기서 되돌린다).
   새로 더하는 언어와 브라우저가 번역한 화면(html 의 lang 이 바뀐다)도 이 규칙을 따른다 */
html:not(:lang(ko)):not(:lang(zh)) #profile-sheet .modal-card.profile .pf-acts .btn { justify-content: flex-start; min-width: auto; padding-left: 2px; padding-right: 2px; }
/* 글꼴이 넓은 기기에서 가장 긴 낱말들을 다 합친 폭이 단추 줄보다 넓으면 단추가 줄 밖으로 나간다. 그때 오른쪽으로만 밀리지 않고 양쪽으로 반씩 나가게 가운데에 모은다(화면 밖으로 나가는 것을 막는다) */
html:not(:lang(ko)):not(:lang(zh)) #profile-sheet .modal-card.profile .pf-acts { justify-content: center; }
html:not(:lang(ko)):not(:lang(zh)) .modal-card.profile .pf-acts .btn span { white-space: normal; overflow-wrap: normal; word-break: normal; text-align: center; line-height: 1.15; font-size: 10.5px; letter-spacing: -0.02em; min-width: min(44px, calc((100vw - 48px) / 7 - 14px)); }
@media (max-width: 370px) { html:not(:lang(ko)):not(:lang(zh)) .modal-card.profile .pf-acts .btn span { font-size: 9.5px; letter-spacing: -0.03em; } }
/* '별로 가기'의 3D 그림은 52px 로 그리지만 자리는 다른 그림처럼 가로세로 26px 만 차지하게 한다
   (단추의 가장 좁은 폭이 그림 때문에 넓어지지 않고, 그 단추의 글이 옆 단추의 글과 같은 높이에서 시작한다. 그림과 제 글 사이는 전과 같다) */
#profile-sheet .pf-acts .stargo-3d { margin: -17px -13px -9px; }
/* 일본어는 낱말 덩어리 사이에서만 줄을 바꾼다('星を|とばす', 'プレゼント|する', 'ゲスト|ブック', 'シェア|カード').
   덩어리 자리는 낱말 사전의 단추 줄 전용 글('단추줄|…', i18n/ja.json)에 폭 없는 빈칸(U+200B)으로 적어 두고, keep-all 로 그 자리에서만 끊는다.
   전에는 브라우저의 덩어리 나누기(auto-phrase)에만 맡겨서, 그 기능이 없는 아이폰에서는 '星をとば/す', 'プレゼン/トする'처럼 낱말 중간에서 끊겼다.
   다만 옛 사파리(2022-11 이전 판, iOS 16.3 까지)는 keep-all 일 때 그 빈칸에서 줄을 바꾸지 못한다(WebKit 버그 248201). 그런 브라우저에서 keep-all 을 쓰면
   글이 한 줄로 남아 단추 줄이 넘치므로, 기본은 전처럼 폭에 맞춰 끊고(네 글자까지는 한 줄), 그 버그가 고쳐진 뒤에 나온 기능(contain-intrinsic-size, 사파리 17)을 아는
   브라우저에서만 keep-all 을 쓴다. auto-phrase 는 함께 쓰지 않는다: 'ろうそく'를 'ろう/そく'로 끊었다(같은 날 확인).
   빈칸이 없는 일본어 글(브라우저가 번역한 화면)은 keep-all 에서 줄이 바뀌지 않는다 */
html:lang(ja) #profile-sheet .modal-card.profile .pf-acts .btn span { line-break: strict; line-height: 1.2; overflow-wrap: anywhere; min-width: min(4.1em, calc((100vw - 48px) / 7 - 4px)); }
@supports (contain-intrinsic-size: 1px) {
  html:lang(ja) #profile-sheet .modal-card.profile .pf-acts .btn span { word-break: keep-all; overflow-wrap: normal; min-width: min(44px, calc((100vw - 48px) / 7 - 14px)); }
}
/* 이름 아래의 '소개' 글자 단추(아래 단추 줄의 '더 보기'를 뺀 뒤 소개 창을 여는 자리) */
#profile-sheet .modal-card.profile .pf-head .pf-info-link { flex: none; width: auto; min-width: 0; min-height: 30px; margin-top: 4px; padding: 4px 14px; border: 1px solid rgba(226,196,140,.45); border-radius: 15px; background: rgba(27,21,36,.6); color: #f3e9dc; font: inherit; font-size: 13px; line-height: 1.3; box-shadow: none; cursor: pointer; pointer-events: auto; }
#profile-sheet .modal-card.profile #pf-info-btn.todo { position: relative; }
#profile-sheet .modal-card.profile #pf-info-btn.todo::after { content: ''; position: absolute; top: 4px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #ee8fa0; }
/* 적을 정보가 남아 있으면 오른쪽 위 단추에 점 */
#profile-sheet .modal-card .pf-x.todo { position: relative; }
#profile-sheet .modal-card .pf-x.todo::after { content: ''; position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: #ee8fa0; }
/* 이름판은 사진 넘기기 줄 아래에 둔다 */
.modal-card.profile .pf-plate { margin-top: 8px; }
#profile-sheet.pf-3d .pf-ph-row { margin-top: 10px; }
#profile-sheet.pf-3d .pf-plate { min-height: 46px; }
/* 방명록 글의 지우기·신고 단추 */
#profile-sheet .pf-guest-acts { display: flex; flex-direction: row; justify-content: flex-end; gap: 4px; }
#profile-sheet .pf-guest-acts .pf-report-inline { align-self: auto; min-height: 26px; }
/* 무료 선물을 이미 준 섬: 고르는 것들을 흐리게 하고 누르지 못하게 한다 */
/* 이미 준 섬에서도 선물·색은 골라 볼 수 있게 흐리게 하지 않는다(2026-11-14 사용자). 한마디 칸만 흐리게 */
#gift-sheet.given #gift-note { opacity: .4; -webkit-filter: grayscale(1); filter: grayscale(1); cursor: default; pointer-events: none; }
#gift-sheet.given #gift-send { opacity: .45; }
#gift-sheet.given #gift-sub { color: #e2c48c; font-weight: 700; }
/* 풍등에 적은 말: 올라가는 동안 화면 위쪽에 잠깐 보인다 */
#profile-sheet .modal-card > .pf-lan-cap { position: absolute; z-index: 5; left: 50%; top: 34%; -webkit-transform: translateX(-50%); transform: translateX(-50%); max-width: 80%; margin: 0; padding: 7px 14px; border-radius: 16px; background: rgba(42,34,53,0.94); color: #f1e8da; font-size: 14.5px; font-weight: 700; line-height: 1.4; text-align: center; box-shadow: 0 3px 10px rgba(60,80,110,.22); pointer-events: none; }
#profile-sheet .modal-card > .pf-lan-cap[hidden] { display: none; }
/* 입체 화면에서는 옆 섬으로 넘길 때 화면 글자 묶음을 옆으로 미는 움직임을 쓰지 않는다(그 움직임 때문에 액자 자리가 잠깐 옆으로 계산되어 섬이 좌우로 튀었다) */
#profile-sheet.pf-3d .modal-card.pf-in-l, #profile-sheet.pf-3d .modal-card.pf-in-r { -webkit-animation: none; animation: none; }

/* ---- 로비(시험 중, ?lobby=1) ---- */
#lobby-ui { position: fixed; inset: 0; z-index: 3; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); }
#lobby-ui > * { pointer-events: auto; }
#lobby-ui[hidden] { display: none; }
.lobby-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lobby-brand { display: flex; flex-direction: column; gap: 2px; padding: 9px 16px; border-radius: 20px; background: rgba(27,21,36,0.78); color: #fffaf0; max-width: 62%; }
.lobby-brand b { font-size: 17px; line-height: 1.2; }
#lobby-live { font-size: 13px; opacity: .92; }
#lobby-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #5fd486; vertical-align: 1px; }
.lobby-right { display: flex; gap: 8px; flex: 0 1 auto; min-width: 0; }
.lobby-brand { min-width: 0; }
.lobby-brand b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 오른쪽 상단 만들기 단추(2026-11-14 사용자 "생성 버튼 우측 상단에") */
.lobby-cta-top { background: var(--accent); color: var(--accent-ink); font-weight: 800; white-space: nowrap; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.lobby-round { min-width: 46px; height: 46px; padding: 0 12px; border: 0; border-radius: 23px; background: rgba(42,34,53,0.88); color: #f1e8da; font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lobby-skip { position: absolute; right: 12px; top: calc(66px + env(safe-area-inset-top)); min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: rgba(27,21,36,0.6); color: #fffaf0; font-size: 14px; font-weight: 700; cursor: pointer; }
.lobby-skip[hidden] { display: none; }
/* 위·아래 묶음 상자 자체는 누르기를 받지 않는다(안의 단추만). 단추가 숨어 있을 때 화면 아래 가운데 바닥 누르기를 삼키던 문제(2026-11-14 사용자 "바닥을 눌렀는데 안 눌러짐") */
#lobby-ui .lobby-top, #lobby-ui .lobby-bottom { pointer-events: none; }
#lobby-ui .lobby-top > *, #lobby-ui .lobby-bottom > * { pointer-events: auto; }
.lobby-bottom { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 520px; margin: 0 auto; transition: opacity .4s; }
.lobby-sit { pointer-events: auto; padding: 10px 22px; border: 0; border-radius: 999px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 15px; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer; }
.lobby-sit[hidden] { display: none; }
/* 아이 동작 단추: 오른쪽 가장자리에 세로 한 줄(2026-11-14 사용자 "강아지 노는 건 우측에 나란히 1줄로") */
#lobby-ui .lobby-pet { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; pointer-events: auto; }
#lobby-ui .lobby-pet .lobby-sit { text-align: center; }
#lobby-ui .lobby-pet[hidden] { display: none; }
.lobby-joy { position: absolute; left: 14px; bottom: calc(170px + env(safe-area-inset-bottom)); width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.55); touch-action: none; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.lobby-joy[hidden] { display: none; }
.lobby-joy-knob { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.86); box-shadow: 0 1px 3px rgba(0,0,0,.35); }
body[data-lobby-in="0"] .lobby-joy { opacity: 0; pointer-events: none; visibility: hidden; }
/* 아래 단추 줄은 입구 근처·들어온 직후에만(로비가 data-lobby-cta로 알림). 아이 동작 단추(.lobby-pet)와 의자 단추는 그대로 */
/* 숨을 때는 자리도 접는다(접히지 않으면 아이 동작 단추가 화면 가운데로 밀려 올라온다, 2026-11-14 사용자 "동물 명령어는 하단에") */
.lobby-bottom .lobby-cta, .lobby-bottom .lobby-sub, .lobby-bottom .lobby-hint { transition: opacity .5s, visibility .5s, max-height .5s, margin .5s, padding .5s; max-height: 96px; overflow: hidden; }
body[data-lobby-cta="0"] .lobby-bottom .lobby-cta, body[data-lobby-cta="0"] .lobby-bottom .lobby-sub, body[data-lobby-cta="0"] .lobby-bottom .lobby-hint { opacity: 0; pointer-events: none; visibility: hidden; max-height: 0; min-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
body[data-lobby-in="0"] .lobby-bottom, body[data-lobby-in="0"] .lobby-top { opacity: 0; pointer-events: none; visibility: hidden; }
/* 로비 위쪽의 소식 줄(하늘 화면 소식 줄을 옮겨 단다) */
#lobby-ui .sky-feed { margin-top: 8px; pointer-events: auto; }
/* 2026-11-15 사용자 "버튼 느낌 말고 그냥 글자만": 로비 왼쪽 위 이름과 소식 줄은 바탕 없이 글자만 보인다(읽히게 그림자만) */
#lobby-ui .lobby-brand { padding: 4px 2px; background: none; border-radius: 0; text-shadow: 0 1px 3px rgba(0,0,0,.8), 0 0 12px rgba(0,0,0,.5); }
#lobby-ui .sky-feed { margin-top: 4px; padding: 0; background: none; border-radius: 0; text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 10px rgba(0,0,0,.55); align-items: flex-start; max-width: 100%; }
/* 위쪽 줄 자리 나눔: 오른쪽 단추들은 줄어들지 않고(글자가 두 줄로 꺾이거나 양옆이 잘리지 않게), 왼쪽 이름·소식 줄이 남는 폭을 쓴다. 소식 줄은 두 줄까지 */
#lobby-ui .lobby-right { flex: none; }
#lobby-ui .lobby-round { flex: none; white-space: nowrap; }
#lobby-ui .lobby-brand { flex: 1 1 0; min-width: 0; max-width: none; }
#lobby-ui .sky-feed .feed-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
#lobby-ui .lobby-cta-top { display: block; max-width: 40vw; line-height: 46px; text-align: center; }
@media (max-width: 350px) {
  #lobby-ui .lobby-right { gap: 5px; }
  #lobby-ui .lobby-round { min-width: 40px; height: 40px; padding: 0 9px; font-size: 13px; }
  #lobby-ui .lobby-cta-top { max-width: 36vw; line-height: 40px; }
}
body[data-lobby-in="0"] #lobby-ui .sky-feed { opacity: 0; pointer-events: none; }
.lobby-hint[hidden] { display: none; }
.lobby-mine { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid rgba(226,196,140,.6); border-radius: 22px; background: rgba(42,34,53,0.92); color: #f3d9a0; font-size: 16px; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.lobby-mine[hidden] { display: none; }
.lobby-mine:active { background: rgba(226,196,140,.2); }
.lobby-hint { margin: 0; padding: 6px 14px; border-radius: 16px; background: rgba(42,34,53,0.82); color: #f1e8da; font-size: 15px; font-weight: 600; text-align: center; }
.lobby-cta { width: 100%; min-height: 56px; padding: 8px 16px; border: 0; border-radius: 18px; background: var(--accent); color: var(--accent-ink); font-size: 18px; font-weight: 800; line-height: 1.25; cursor: pointer; box-shadow: 0 6px 16px rgba(181,83,47,.35); }
.lobby-sub { min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: rgba(42,34,53,0.86); color: #f1e8da; font-size: 14px; font-weight: 700; cursor: pointer; }
.lobby-sub[hidden] { display: none; }
.lobby-nudge { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; padding: 14px; border-radius: 18px; background: var(--card); box-shadow: 0 8px 24px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 8px; z-index: 14; }
.lobby-nudge[hidden] { display: none; }
.lobby-nudge p { margin: 0 0 2px; font-weight: 700; text-align: center; line-height: 1.4; }
body[data-lobby-night="1"] .lobby-round, body[data-lobby-night="1"] .lobby-sub, body[data-lobby-night="1"] .lobby-hint { background: rgba(27,21,36,0.72); color: #f3eee6; }
html[lang="vi"] body,html[lang="vi"] button,html[lang="vi"] input,html[lang="vi"] textarea,html[lang="vi"] select{font-family:system-ui,sans-serif;word-break:normal;overflow-wrap:anywhere}

/* 차분한 추모관 톤 시안(?tone=calm): 로비 단추와 안내를 짙고 차분한 색으로 */
body[data-tone="calm"] .lobby-cta { background: #c9a45c; color: #1b1524; }
body[data-tone="calm"] .lobby-sub, body[data-tone="calm"] .lobby-hint { background: rgba(27,21,36,0.72); color: #f1e9db; }
body[data-tone="calm"] .lobby-round { background: rgba(27,21,36,0.78); color: #f1e9db; }

/* 상자 화면의 확대·축소와 옆 섬 넘기기 단추: 바탕 없이 글자만 보인다(2026-11-13 사용자 요청). 경쟁사의 둥근 단추와 다르게 세로 눈금 모양 */
#profile-sheet.pf-3d .pf-zoom { right: 10px; gap: 0; align-items: center; }
#profile-sheet.pf-3d .pf-zoom::before { content: ''; order: 1; width: 1px; height: 36px; background: rgba(255,246,232,.38); }
#profile-sheet.pf-3d .pf-zoom button { width: 40px; height: 40px; border: 0; border-radius: 0; background: transparent; color: rgba(255,246,232,.85); font-size: 27px; text-shadow: 0 1px 5px rgba(27,21,36,0.7); }
#profile-sheet.pf-3d .pf-zoom #pf-zoom-in { order: 0; }
#profile-sheet.pf-3d .pf-zoom #pf-zoom-out { order: 2; }
#profile-sheet.pf-3d > .pf-nav { background: transparent; box-shadow: none; color: rgba(255,246,232,.75); }
#profile-sheet.pf-3d > .pf-nav svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 4px rgba(27,21,36,0.7)); }
/* 관리 화면의 유료 선택지: 흐리게 보이고 아래에 작은 '유료' 글자 */
.mg-shelf-dots .mg-shelf-dot.paid { position: relative; opacity: .55; cursor: default; }
.mg-shelf-dots .mg-shelf-dot.paid::after { content: attr(data-paid); position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); font-size: 9px; line-height: 12px; font-weight: 700; color: #e2c48c; white-space: nowrap; }
.mg-shelf-dots:has(.paid) { padding-bottom: 12px; }
/* 공유 카드 선택지: 가로로 넘기지 않고 줄을 바꿔 아래로 늘어난다(2026-11-13 사용자 "가로 안 나오게, 세로로 배열") */
#share-sheet .sh-chips { flex-wrap: wrap; overflow: visible; row-gap: 6px; }
#share-sheet .sh-opts, #share-sheet .sh-more { align-items: start; }
#share-sheet .sh-opts .sh-label { padding-top: 8px; }
/* 선물 창의 입체 아이콘 그림 */
.gift-kind .gift-thumb { width: 44px; height: 44px; object-fit: contain; }
.gift-preview .gift-thumb { width: 96px; height: 96px; object-fit: contain; }
.gift-preview .gift-live { width: 96px; height: 96px; display: block; }
/* 선물 보내기 연출 1단계: 미리보기가 커지며 화면 가운데로, 그다음 창의 나머지가 사라진다(gift-ui.js liftPreview) */
#gift-sheet.lift { pointer-events: none; }
#gift-sheet.lift .gift-card { overflow: visible; }
#gift-sheet.lift .gift-preview { position: relative; z-index: 3; transition: transform .45s cubic-bezier(.2,.7,.2,1); will-change: transform; }
#gift-sheet.lift-out { background: rgba(28,44,48,0); transition: background .25s; }
#gift-sheet.lift-out .gift-card { background: transparent; box-shadow: none; transition: background .25s; }
#gift-sheet.lift-out .gift-card > *:not(.gift-show), #gift-sheet.lift-out .gift-about { opacity: 0; transition: opacity .25s; }
#gift-sheet.lift-out .gift-show { background: transparent; border-color: transparent; box-shadow: none; transition: background .25s; }
.gift-kind .gift-ico { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; }
/* 상점 구매 창 */
.shop-card .shop-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: #352b44; }
.shop-card .shop-swatch { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; border: 3px solid #2a2235; box-shadow: 0 2px 8px rgba(60,40,20,.2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #f1e8da; text-align: center; }
.shop-card .shop-about b { display: block; font-size: 16px; color: #f1e8da; }
.shop-card .shop-about p { margin: 2px 0 0; font-size: 13px; color: #f1e8da; }
.shop-card .shop-price { font-size: 18px; font-weight: 800; color: #e2c48c; }
.shop-card .shop-note { margin: 8px 0; font-size: 12.5px; line-height: 1.45; color: #f1e8da; }
.shop-card #shop-all[hidden] { display: none; }

/* 로비 메뉴 창: 가운데 창 + 탭(2026-11-14). 어두운 자주빛 바탕에 금빛 강조 */
/* 휴대폰 화면 비율의 세로로 긴 창(사용자 "모달로 핸드폰 비율로"): 넓은 화면에서도 폭 360 */
.menu-card { position: relative; width: min(360px, 100%); min-height: min(560px, 84vh); gap: 12px; padding: 20px 18px 18px; }
.menu-card h2 { margin: 0; text-align: center; font-size: 20px; }
.menu-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 18px; background: rgba(255,255,255,.08); color: #f1e8da; display: flex; align-items: center; justify-content: center; cursor: pointer; }
/* .modal-card > div 규칙이 세로로 쌓으므로 같은 세기로 가로 한 줄을 다시 정한다 */
.modal-card.menu-card > div.menu-tabs { display: flex; flex-direction: row; gap: 6px; }
.menu-tab { flex: 1 1 0; min-height: 40px; padding: 0 4px; border: 1.5px solid var(--line); border-radius: 12px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.menu-tab.on { background: #c9a45c; color: #1b1524; border-color: #c9a45c; }
.menu-pane { display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
.menu-pane[hidden] { display: none; }
.menu-pane .btn { width: 100%; }
.menu-h { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: #e2c48c; text-align: center; }
.menu-opts { display: flex; gap: 6px; }
.menu-opt { flex: 1 1 0; min-height: 42px; border: 1.5px solid var(--line); border-radius: 12px; background: #352b44; color: #f1e8da; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.menu-opt.on { background: #c9a45c; color: #1b1524; border-color: #c9a45c; }
.menu-note { margin: 0; font-size: 12px; line-height: 1.5; color: #b9ac9d; text-align: center; }
.menu-links { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; }
.menu-links a { color: #e2c48c; }

/* 로비 아래 단추 줄: '모든 아이 · 촛불 기다리는 아이 · 마음 n'(lobby-top.js가 아래 묶음 끝에 붙인다).
   2026-11-15 사용자가 경쟁 서비스 화면(아이콘 줄이 위, '우리 아이 추가'가 아래)을 보내며 "우리는 우리 아이 추가는 위로 올리고 위의 아이콘 바를 아래로 내리자":
   자리 만들기 단추는 오른쪽 위에 그대로 두고, 이 줄을 화면 맨 아래의 둥근 띠로 내렸다(그림 위, 글자 아래). 내려앉기 전에는 아래 묶음과 함께 감춰진다 */
#lobby-ui .lobby-chips { display: flex; flex-direction: row; align-items: stretch; gap: 2px; width: 100%; padding: 6px 8px; border-radius: 26px; background: rgba(42,34,53,0.92); box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.lobby-chip { flex: 1 1 0; min-width: 0; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 1px; border: 0; border-radius: 18px; background: none; color: #f1e8da; font: inherit; font-size: 11px; font-weight: 700; line-height: 1.15; text-align: center; cursor: pointer; }
.lobby-chip:active { background: rgba(226,196,140,.18); }
.lobby-chip img { width: 26px; height: 26px; flex: none; }
.lobby-chip span { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; }
.lobby-chip[data-chip="warm"] { color: #f3d9a0; }
/* 자리 만들기 안내 카드는 아래 단추 줄 위에 뜨게 올린다 */
.lobby-nudge { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* 위쪽 단추의 세부 창(모든 아이, 촛불 기다리는 아이, 마음, 소개): 메뉴 창과 같은 어두운 자주빛 카드 */
.top-sheet .top-card { position: relative; width: min(420px, 100%); max-height: 86vh; overflow: hidden; gap: 12px; padding: 20px 16px 16px; }
.top-sheet .top-card h2 { margin: 0; padding: 0 40px; text-align: center; font-size: 20px; }
.top-sheet .top-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 18px; background: rgba(255,255,255,.08); color: #f1e8da; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.top-sheet .top-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
.top-sheet .top-lead { margin: 0; text-align: center; font-size: 14px; line-height: 1.5; color: #cfc2ae; word-break: keep-all; }
.top-sheet .top-note { margin: 0; text-align: center; font-size: 12px; line-height: 1.55; color: #b9ac9d; word-break: keep-all; }
.top-sheet .top-none { margin: 6px 0; text-align: center; font-size: 14px; color: #b9ac9d; }
.top-sheet .top-none[hidden] { display: none; }
.top-sheet .top-find { min-height: 44px; }
.top-sheet .lan-text { min-height: 84px; resize: none; line-height: 1.5; }
/* 함께 촛불 켜는 시간(together.js): 로비 왼쪽 위 이름 아래의 한 줄과 창 안의 수 */
.lobby-together { order: 5; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 30px; margin-top: 6px; padding: 5px 11px 5px 8px; border: 1px solid rgba(226,196,140,.38); border-radius: 16px; background: rgba(27,21,36,.72); color: #f3e9dc; font: inherit; font-size: 12px; line-height: 1.3; text-align: left; text-shadow: none; cursor: pointer; }
.lobby-together[hidden] { display: none; }
.lobby-together img { flex: none; width: 16px; height: 16px; }
.lobby-together span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; }
.lobby-together.on { border-color: #e2c48c; background: rgba(74,56,34,.86); color: #fff4d8; }
.tg-box { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: #352b44; text-align: center; }
.tg-num { font-size: 34px; font-weight: 800; line-height: 1.15; color: #f0d9a8; }
.tg-when { font-size: 18px; font-weight: 800; line-height: 1.35; color: #f0d9a8; word-break: keep-all; }
.tg-sub { font-size: 13px; line-height: 1.45; color: #d9cfe2; word-break: keep-all; }
/* 로비 모임(lobby-meet.js): 함께 있는 사람 수 단추(아래 단추 줄 위, 오른쪽)와 인사말 고르기 */
.lobby-meet { align-self: flex-end; min-height: 36px; padding: 7px 14px; border: 1px solid rgba(226,196,140,.5); border-radius: 18px; background: rgba(42,34,53,.9); color: #fff4d8; font: inherit; font-size: 13px; line-height: 1.3; cursor: pointer; }
.lobby-meet[hidden] { display: none; }
.meet-says { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.meet-says .btn { min-height: 48px; padding: 8px 10px; font-size: 14px; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
/* 기억 한 장(stories.js): '위로' 창 위의 갈래 단추와 글 한 장 */
.top-sheet .top-tabs { display: flex; flex-direction: row !important; flex: none; gap: 6px !important; padding: 4px; border-radius: 14px; background: #241c30; }
.top-sheet .top-tabs[hidden] { display: none; }
.top-sheet .top-tab { flex: 1 1 0; width: auto; min-width: 0; min-height: 40px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; color: #cfc2ae; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.top-sheet .top-tab.on { background: #4a3b5e; color: #fff4d8; }
.st-need, .st-sub { margin: 0; font-size: 13px; line-height: 1.5; color: #cfc2ae; text-align: center; word-break: keep-all; }
.st-feed { display: flex; flex-direction: column; gap: 12px; }
.st-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #352b44; }
.st-who { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.st-meta { display: flex; flex-direction: column; min-width: 0; }
.st-meta b { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-meta span { font-size: 12px; color: #cfc2ae; }
.st-team { align-self: flex-start; padding: 3px 9px; border-radius: 999px; background: rgba(226,196,140,.16); color: #e2c48c; font-size: 12px; font-weight: 700; }
.st-pic { width: 100%; max-height: 240px; border-radius: 10px; object-fit: cover; background: #241c30; }
.top-sheet .st-text { margin: 0; font-size: 15px; line-height: 1.6; color: #f1e8da; white-space: pre-wrap; overflow-wrap: anywhere; }
.top-sheet .st-text.clip { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.st-link { align-self: flex-start; min-height: 32px; padding: 4px 0; border: 0; background: none; color: #e2c48c; font: inherit; font-size: 13px; cursor: pointer; }
.st-link.st-foot { align-self: flex-end; color: #a99cb8; }
.st-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.st-act { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 18px; background: #2a2235; color: #f1e8da; font: inherit; font-size: 13px; cursor: pointer; }
.st-act img { width: 18px; height: 18px; opacity: .75; }
.st-act.on { border-color: #e2c48c; color: #fff4d8; }
.st-act.on img { opacity: 1; }
.st-guest { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: #2a2235; }
.st-guest[hidden] { display: none; }
.top-sheet .st-g { margin: 0; font-size: 14px; line-height: 1.5; color: #f1e8da; overflow-wrap: anywhere; }
.st-g b { color: #e2c48c; font-weight: 700; }
.st-write { display: flex; gap: 8px; }
.st-write input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #241c30; color: #f1e8da; font: inherit; font-size: 15px; }
.st-write .btn { flex: none; width: auto; min-height: 44px; padding: 8px 16px; }
.st-compose { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #352b44; }
.st-topics { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.st-topic { min-height: 34px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 17px; background: #2a2235; color: #cfc2ae; font: inherit; font-size: 13px; cursor: pointer; }
.st-topic.on { border-color: #e2c48c; background: #4a3b5e; color: #fff4d8; }
.st-compose .lan-text { min-height: 130px; }
.st-row { display: flex; gap: 8px; }
.st-row .btn { flex: 1 1 0; }
/* 펫레터: 글의 사진, 댓글, 글쓰기 칸의 사진 고르기, 받은 소식 줄(2026-11-17) */
.st-photos { display: grid; grid-template-columns: 1fr; gap: 6px; }
.st-photos.many { grid-template-columns: 1fr 1fr; }
.st-photos img { width: 100%; max-height: 320px; border-radius: 10px; object-fit: cover; background: #241c30; cursor: pointer; }
.st-photos.many img { height: 150px; }
.st-photos img.big { grid-column: 1 / -1; height: auto; max-height: none; object-fit: contain; }
.top-sheet .st-th { margin: 0; font-size: 12.5px; color: #e2c48c; }
.st-cm { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: #2a2235; }
.st-cm[hidden] { display: none; }
.st-cm-list { display: flex; flex-direction: column; gap: 12px; }
.st-c { display: flex; flex-direction: column; gap: 3px; }
.st-c-head { display: flex; flex-direction: row; align-items: baseline; gap: 8px; }
.st-c-name { padding: 0; border: 0; background: none; color: #e2c48c; font: inherit; font-size: 13.5px; font-weight: 700; text-align: left; }
button.st-c-name { min-height: 28px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.st-c-when { font-size: 12px; color: #a99cb8; }
.top-sheet .st-c-text { margin: 0; font-size: 14.5px; line-height: 1.5; color: #f1e8da; overflow-wrap: anywhere; }
.st-c-foot { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.st-c-act { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 0; border: 0; background: none; color: #cfc2ae; font: inherit; font-size: 12.5px; cursor: pointer; }
.st-c-act img { width: 15px; height: 15px; opacity: .7; }
.st-c-act.on { color: #fff4d8; }
.st-c-act.on img { opacity: 1; }
.st-c-team { font-size: 12px; color: #e2c48c; }
.st-count { align-self: flex-end; font-size: 12px; color: #a99cb8; }
.st-thumbs { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; }
.st-thumbs:empty { display: none; }
.st-thumb { position: relative; width: 76px; height: 76px; }
.st-thumb img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.st-thumb button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #1b1524; color: #f1e8da; font-size: 16px; line-height: 1; cursor: pointer; }
.st-card.hit { border-color: #e2c48c; }
/* 받은 소식: 화면 위쪽에 잠깐 떠 있는 한 줄. 창이 아니어서 뒤의 화면을 가리거나 막지 않는다. 열려 있는 창(11)과 알림 글(12)보다 위에 둔다 */
.st-news { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 14; transform: translateX(-50%); display: flex; flex-direction: row; align-items: center; gap: 10px; width: max-content; max-width: min(92vw, 460px); box-sizing: border-box; padding: 10px 10px 10px 14px; border: 1px solid rgba(226,196,140,.7); border-radius: 16px; background: rgba(36,28,48,.97); color: #f1e8da; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.st-news[hidden] { display: none; }
.st-news > img { flex: none; width: 22px; height: 22px; }
.st-news-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.st-news-body b { font-size: 14.5px; font-weight: 700; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.st-news-body span { font-size: 12.5px; color: #cfc2ae; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-news-open { flex: none; min-height: 36px; padding: 4px 12px; border: 0; border-radius: 18px; background: #e2c48c; color: #2a2235; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.st-news-x { flex: none; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: #cfc2ae; font-size: 18px; line-height: 1; cursor: pointer; }
/* 위로 한마디 창: 아이 사진·이름과 가족이 적어 둔 한마디 */
.cmf-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #352b44; }
.cmf-who { display: flex; align-items: center; gap: 10px; }
.cmf-who b { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-sheet .cmf-note { margin: 0; font-size: 15px; line-height: 1.55; color: #f1e8da; word-break: keep-all; overflow-wrap: anywhere; }
.top-sheet .top-list { display: flex; flex-direction: column; gap: 6px; min-height: 62px; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px 2px; }
.top-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; flex: none; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 14px; background: #352b44; color: #f1e8da; font: inherit; text-align: left; cursor: pointer; }
.top-row[hidden] { display: none; }
.top-row:active { background: #40344f; }
.top-ph { flex: none; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; background: #241c30; display: flex; align-items: center; justify-content: center; }
.top-ph img { width: 100%; height: 100%; object-fit: cover; }
.top-ph img[src$=".svg"] { width: 22px; height: 22px; opacity: .7; }
.top-tx { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.top-tx b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-tx span { font-size: 12px; color: #b9ac9d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-go { flex: none; max-width: 44%; padding: 7px 10px; border-radius: 999px; background: #c9a45c; color: #1b1524; font-size: 12px; font-style: normal; font-weight: 800; line-height: 1.2; text-align: center; }
.warm-big { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; }
.warm-big b { font-size: 44px; line-height: 1.1; font-weight: 800; color: #f3d9a0; }
.warm-big span { font-size: 13px; font-weight: 700; color: #cfc2ae; }
.warm-ways { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.warm-ways li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; background: #352b44; font-size: 14px; font-weight: 700; }
.warm-ways li img { width: 22px; height: 22px; flex: none; }
.warm-ways li span { flex: 1 1 0; min-width: 0; }
.warm-ways li b { color: #f3d9a0; font-weight: 800; }
/* 상자 화면 오른쪽 위의 사진기 단추(box-shot.js): 공유 단추 바로 왼쪽에 붙인다(위쪽 줄은 양 끝 정렬이라 남는 폭을 왼쪽 여백으로 받는다) */
#profile-sheet .modal-card.profile .pf-top .pf-top-shot { margin-left: auto; margin-right: 8px; }
/* 관리 화면의 '보호자 꽃', '보호자 촛불' 자리 고르기는 감춘다: 상자에서 보호자 꽃병·양초를 보이지 않게 했다(profile-scene.js OWN_ITEMS, 2026-11-15 사용자 "양끝의 꽃병과 양초는 X") */
#mg-own-flower-row, #mg-own-candle-row { display: none; }
/* 이메일 로그인 링크 확인 창(signin-link.js): 단추를 눌러야 로그인한다. 다른 기기에서 돌려받은 아이는 사진을 보여 주고 묻는다 */
.signin-sheet .top-card { width: min(360px, 100%); }
.signin-sheet .signin-photo { align-self: center; width: 96px; height: 96px; border-radius: 16px; object-fit: cover; background: #241c30; }
/* 소개 창: 소개 페이지를 창 안에 연다. 페이지가 길어 창을 크게 쓴다 */
.about-sheet { padding: 10px; }
.about-sheet .top-card { width: min(720px, 100%); height: 92vh; max-height: 92vh; padding: 14px 0 0; gap: 10px; }
.about-sheet .top-body { display: flex; }
.about-frame { flex: 1 1 auto; width: 100%; height: 100%; border: 0; background: #fff; border-radius: 0 0 16px 16px; }
/* 소개 문서에 링크 받는 일이 붙기 전에는 누르기를 받지 않는다(lobby-top.js openAbout) */
.about-frame.wait { pointer-events: none; }
/* 옛 주소에서 넘어온 회원 안내 한 줄(로비 위쪽 줄과 그 아래 고르기 단추 줄 밑) */
.lobby-moved { position: absolute; top: calc(108px + env(safe-area-inset-top)); left: 12px; right: 12px; max-width: 520px; margin: 0 auto; padding: 10px 14px; border: 1px solid rgba(226,196,140,.5); border-radius: 12px; background: rgba(42,34,53,.92); color: #f3e9dc; font: inherit; font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; z-index: 6; }
.lobby-moved[hidden] { display: none; }
/* 손가락으로 누르기 작은 곳은 보이는 크기는 두고 누르는 영역만 44 안팎으로 넓힌다(2026-11-15 눌러 보기 점검) */
#profile-sheet > .pf-nav::before { content: ''; position: absolute; top: 0; bottom: 0; left: -8px; right: -8px; }
#profile-sheet .pf-translate { position: relative; }
#profile-sheet .pf-translate::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; }
.mpe-switch::before { content: ''; position: absolute; left: -4px; right: -4px; top: -7px; bottom: -7px; }
.mg-shelf-dots .mg-shelf-dot, .mg-shelf-dots .mg-chip { position: relative; }
.mg-shelf-dots .mg-shelf-dot::before, .mg-shelf-dots .mg-chip::before { content: ''; position: absolute; left: -3px; right: -3px; top: -9px; bottom: -9px; }
/* 만들기 창: 품종 목록과 털 색 점 */
#make-flow .make-breed-box { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
#make-flow .make-breed-box[hidden] { display: none; }
#make-flow .make-breed { width: 100%; min-height: 44px; }
#make-flow .make-coat { display: flex; gap: 10px; flex-wrap: wrap; }
#make-flow .make-coat-dot { position: relative; width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); cursor: pointer; }
#make-flow .make-coat-dot::before { content: ''; position: absolute; left: -6px; right: -6px; top: -6px; bottom: -6px; }
#make-flow .make-coat-dot.on { border-color: #c9a45c; outline: 2px solid #c9a45c; outline-offset: 2px; }
/* 로그인 전에 만든 내 상자의 안내(사라지지 않는다) */
#profile-sheet .pf-pending { margin: 8px auto 0; max-width: 340px; padding: 9px 12px; border: 1px solid rgba(226,196,140,.55); border-radius: 12px; background: rgba(42,34,53,.88); color: #f3e9dc; font-size: 13px; line-height: 1.45; text-align: center; }
#profile-sheet .pf-pending[hidden] { display: none; }
#profile-sheet .pf-pending-login { display: block; margin: 6px auto 0; min-height: 36px; padding: 0 14px; border: 0; background: none; color: #e2c48c; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

#lobby-ui .lobby-wordmark{width:120px;max-width:100%;height:34px;object-fit:contain;background:#fff9ec;border-radius:8px;padding:4px;box-sizing:border-box}#lobby-ui .lobby-brand b{font-size:11px}

/* 별로 가기 아이콘: 단추 안의 작은 캔버스에서 3D 모형이 실제로 돈다(star-icon.js, 2026-11-18). 전에는 미리 그린 그림 24장을 넘겼다 */
/* 2026-11-17 사용자 "1.3배 컸으면": 34 → 44, 2026-11-18 실제 3D 로 바꾸며 52. 줄 높이는 그대로 두려고 위아래로 넘치게 둔다 */
.stargo-3d { display: block; width: 52px; height: 52px; margin: -15px auto -9px; pointer-events: none; }
.stargo-3d[hidden] { display: none; }
.stargo-3d canvas { display: block; width: 100%; height: 100%; }

/* 손님이 기억노트를 쓸 때의 아이 이름 칸 */
.st-name { width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 10px 12px; border: 1px solid #4a3f5a; border-radius: 12px; background: rgba(255,255,255,.06); color: #f1e8da; font-size: 16px; }

#lobby-ui .lobby-memory {
  pointer-events: auto; width: min(92%, 420px); min-width: 0; min-height: 44px;
  padding: 5px 14px; text-align: start; color: #fff8ea; background: #332a3cee;
  border: 1px solid #75697d; border-radius: 12px; cursor: pointer;
}
.lobby-memory small, .lobby-memory span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lobby-memory small { color: #efdbba; font-size: 11px; }
.lobby-memory span { font-size: 14px; }


/* 관리 창의 내 아이들(최대 3명) */
.mg-pets { display: flex; gap: 8px; margin: 0 0 12px; overflow-x: auto; }
.mg-pets[hidden] { display: none; }
.mg-pet { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; max-width: 96px; padding: 8px 6px; border: 1px solid #4a3f5a; border-radius: 14px; background: transparent; color: #f1e8da; font-size: 13px; font-weight: 600; }
.mg-pet span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-pet.on { border-color: #e2c48c; background: rgba(226,196,140,.14); color: #f3d9a0; }
.mg-pet-ph { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #2c1d3a; }
.mg-pet-ph img { width: 100%; height: 100%; object-fit: cover; }
.mg-pet-add { justify-content: center; min-width: 96px; color: #e2c48c; border-style: dashed; }

/* 상자 스킨(2026-11-23): 관리 화면 단추, 스킨 창, 소개 창의 내 상자 단추 */
.mg-skin-open { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px 4px 4px; border-radius: 18px; border: 1px solid rgba(201,164,92,.6); background: #fff8ec; color: #4a3a2a; font: inherit; font-size: 13px; cursor: pointer; }
.mg-skin-open b { font-weight: 700; }
.mg-skin-pic { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); background: #5a3d2b; }
.skin-card .skin-now { flex-direction: row !important; align-items: center; gap: 12px !important; padding: 10px; border-radius: 14px; background: #352b44; }
.skin-pv-pic { flex: none; width: 64px; height: 64px; border-radius: 12px; border: 3px solid #e2c48c; background: #5a3d2b; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.skin-now-text { display: flex; flex-direction: column; gap: 2px; }
.skin-now-text small { font-size: 12px; color: #c9b9a2; }
.skin-now-text b { font-size: 18px; color: #f1e8da; }
.skin-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: #e8dccb; }
#skin-list { gap: 6px; }
#skin-list h3 { margin: 6px 0 0; font-size: 14px; color: #e2c48c; }
#skin-list .skin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.skin-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 7px; border-radius: 12px; border: 2px solid transparent; background: #352b44; color: #f1e8da; font: inherit; cursor: pointer; }
.skin-item.on { border-color: #e2c48c; background: #43364f; }
.skin-pic { display: block; width: 100%; max-width: 76px; aspect-ratio: 1 / 1; border-radius: 10px; background: #5a3d2b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
@supports not (aspect-ratio: 1 / 1) { .skin-pic { height: 64px; } }
.skin-item b { font-size: 13px; line-height: 1.25; text-align: center; }
.skin-item small { font-size: 11.5px; color: #c9b9a2; }
.skin-item.on small { color: #e2c48c; font-weight: 700; }
.skin-item.free small { color: #9fd8b0; }
#profile-sheet .pf-go-row #pf-skin { flex: none; min-height: 38px; margin-left: 8px; padding: 0 14px; border-radius: 19px; border: 1px solid rgba(226,196,140,.55); background: rgba(42,34,53,.92); color: #e2c48c; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
#profile-sheet .pf-go-row #pf-skin[hidden] { display: none; }
.skin-now-text .skin-pv-left { color: #e2c48c; font-weight: 700; }
.skin-now-text .skin-pv-left[hidden] { display: none; }
/* 공지 그림(2026-11-23 상자 스킨) */
.news-item .news-pic { display: block; width: 100%; height: auto; margin-top: 10px; border-radius: 10px; }
.news-item .news-pic-menu { width: 72%; margin-left: auto; margin-right: auto; }
.news-item .news-pic[hidden] { display: none; }
.news-skin #news-skin-go { width: 100%; margin-top: 10px; }
.news-skin #news-skin-go[hidden] { display: none; }
/* 선물 창 크기 고정(2026-11-23 사용자 "메뉴 크기가 안 변하게", "고정시켜 놓고 모자라면 하단으로 스크롤"): 창 높이는 그대로, 선물 칸 목록만 남는 자리를 채우고 넘치면 아래로 스크롤 */
.modal-card.gift-card { height: min(640px, 88vh); overflow: hidden; }
.modal-card.gift-card > .gift-kinds { flex: 1 1 auto; min-height: 0; max-height: none; align-content: start; grid-auto-rows: min-content; -webkit-overflow-scrolling: touch; }
.modal-card.gift-card > :not(.gift-kinds) { flex-shrink: 0; }
#gift-sheet.lift .modal-card.gift-card { overflow: visible; }
/* 탭 다섯 개(먹을 것·장난감·작은 마음·크리스마스·상자 스킨)가 한 줄에 다 보이게, 좁은 화면에서는 두 줄로 */
.modal-card > .gift-cats { flex-wrap: wrap; row-gap: 6px; }
.gift-cat { flex: 1 1 auto; white-space: nowrap; padding: 7px 6px; font-size: 12px; }
.gift-cat-skin { border-color: #c9a45c; color: #e2c48c; }
.gift-kind-skin { position: relative; }
.gift-kind .gift-skin-pic { border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.gift-kind-skin .gift-skin-now { position: absolute; top: 4px; right: 4px; padding: 0 5px; border-radius: 6px; background: #c9a45c; color: #1b1524; font-size: 10.5px; font-weight: 800; line-height: 16px; }
.gift-preview .gift-skin-big { display: block; width: 88px; height: 88px; border-radius: 14px; border: 3px solid #e2c48c; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.skin-now-text .skin-pv-from { color: #9fd8b0; font-weight: 700; }
.skin-now-text .skin-pv-from[hidden] { display: none; }
@media (max-width: 380px) { .gift-cat { padding: 6px 4px; font-size: 11.5px; } .modal-card > .gift-cats { column-gap: 4px; } }

/* Thai glyphs and combining marks use a native Thai-capable font. */
html[lang="th"],html[lang="th"] body,html[lang="th"] button,html[lang="th"] input,html[lang="th"] textarea,html[lang="th"] select{font-family:"Noto Sans Thai",Tahoma,system-ui,sans-serif;word-break:normal;overflow-wrap:anywhere}
/* 로비 위 숫자 한 줄(2026-11-24) */
#lobby-ui .lobby-stats { display: block; max-width: 100%; font-size: 12px; line-height: 1.35; font-weight: 600; color: #f3e6cc; opacity: .95; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
#lobby-ui .lobby-stats[hidden] { display: none; }
/* 소개 창의 '우리 아이 자리 만들기'(2026-11-28): 자리가 없는 방문자에게만 */
#profile-sheet .pf-go-row #pf-make { flex: none; min-height: 42px; padding: 0 20px; border-radius: 21px; border: 0; background: #c9a45c; color: #1b1524; font: inherit; font-size: 14.5px; font-weight: 800; box-shadow: 0 3px 10px rgba(0,0,0,.35); cursor: pointer; }
#profile-sheet .pf-go-row #pf-make[hidden] { display: none; }
