/* 초원 봉안함 기능 (js/steppe/features.js): 독, 사물함 보기, 꾸미기, 시트, 아래 막대 */
:root { --sf-paper: #fffbf6; --sf-line: rgba(120, 90, 70, .14); --sf-soft: #f6ede4; }

/* 기존 아래 줄(목도리 · 내 아이 자리로)은 독 위로 */
.bottom { bottom: calc(86px + var(--safe-b)); }
@media (max-width: 640px) { .count { bottom: 58px; } }
body.sf-viewing .bottom, body.sf-viewing .hud, body.sf-viewing .sf-hud, body.sf-viewing .hint { display: none; }

.sf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; color: var(--ink); }
.sf-btn.primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(200, 90, 80, .28); }
.sf-btn.ghost { background: #fff; box-shadow: inset 0 0 0 1.5px var(--sf-line); }
.sf-btn:disabled { opacity: .45; cursor: default; }
.sf-btn .em { font-size: 18px; }
.sf-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.sf-wide { width: 100%; }
.sf-link { border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 8px; }
.sf-small { font-size: 12.5px; color: var(--ink-soft); }
.sf-hint { margin: 0 0 12px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }
.sf-sub { margin: 18px 0 8px; font-size: 15px; }
.pulse { animation: sfPulse 1.6s ease-in-out infinite; }
@keyframes sfPulse { 50% { transform: scale(1.04); } }

/* 오른쪽 위: 편지함 · 로그인 */
.sf-hud { position: fixed; right: 12px; top: calc(62px + var(--safe-t)); z-index: 11; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.sf-hud .icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sf-hud .icon-btn svg { width: 22px; height: 22px; stroke: var(--ink); stroke-width: 1.8; fill: none; }

/* 독: 네 칸 */
.sf-dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 12; display: flex; gap: 4px; padding: 6px; border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); width: min(440px, calc(100% - 20px)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sf-dock button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; border-radius: 20px; padding: 7px 2px 6px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.sf-dock button:hover { background: rgba(240, 143, 134, .1); }
.sf-dock svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sf-dock .sf-dock-main { color: #c0645c; }

/* 사물함 보기 */
.sf-view { position: fixed; inset: 0; z-index: 21; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: calc(14px + var(--safe-t)) 16px calc(16px + var(--safe-b)); background: radial-gradient(ellipse at 50% 42%, rgba(255, 236, 214, .97), rgba(196, 160, 128, .96) 70%, rgba(120, 92, 74, .97)); animation: sfIn .35s ease both; }
@keyframes sfIn { from { opacity: 0; } }
.sf-stage { position: relative; width: min(70vw, 980px); max-height: 62vh; aspect-ratio: 1.42; }
.sf-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.sf-edit { position: absolute; right: 9%; top: 10%; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 250, 241, .95); box-shadow: 0 3px 10px rgba(80, 50, 40, .18); font-size: 18px; cursor: pointer; }
.sf-plate { margin: 0; padding: 7px 18px; border-radius: 12px; background: linear-gradient(#fffaf1, #f6e9d4); border: 1.5px solid #d9bd86; color: #6b4b31; font-weight: 700; font-size: 15px; box-shadow: 0 3px 10px rgba(80, 50, 40, .12); text-align: center; word-break: keep-all; }
.sf-controls { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sf-main { min-width: 200px; }
.sf-pill { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 250, 241, .92); box-shadow: 0 3px 12px rgba(80, 50, 40, .14); }
.sf-pill button { border: 0; background: none; padding: 7px 12px; border-radius: 999px; font: inherit; font-size: 14px; color: #6b4b31; cursor: pointer; }
.sf-pill button:disabled { opacity: .35; cursor: default; }
.sf-pill span { padding: 0 6px; font-weight: 700; font-size: 13.5px; color: #4a3626; white-space: nowrap; }
.sf-pill i { width: 1px; height: 18px; background: #e2cdb2; margin: 0 4px; }
.sf-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); display: flex; gap: 4px; padding: 6px; border-radius: 24px; background: rgba(255, 250, 241, .95); box-shadow: var(--shadow); width: min(520px, calc(100% - 20px)); }
.sf-bar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; border-radius: 18px; padding: 7px 2px; font: inherit; font-size: 12px; color: #5b4232; cursor: pointer; white-space: nowrap; }
.sf-bar button:hover { background: #f6e6d2; }
.sf-bar .em { font-size: 19px; }
.sf-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 14px 18px; border-radius: 20px; background: rgba(255, 250, 241, .94); box-shadow: 0 3px 12px rgba(80, 50, 40, .14); max-width: 360px; }
.sf-empty p { margin: 0; color: #5b4232; font-size: 14.5px; }
.sf-view.empty .sf-controls, .sf-view.empty #sfGift, .sf-view.empty #sfLetter { display: none; }
.sf-view.decorating { justify-content: flex-start; padding-bottom: 0; }
.sf-view.decorating .sf-controls, .sf-view.decorating .sf-homebtn, .sf-view.decorating .sf-edit { display: none; }
.sf-view.decorating canvas { cursor: crosshair; }
@media (max-width: 720px) { .sf-stage { width: calc(100% + 32px); margin: 0 -16px; max-height: 50vh; } .sf-plate { font-size: 14px; } .sf-main { min-width: 170px; } }

/* 꾸미기 */
.sf-decor { position: fixed; z-index: 24; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); background: var(--sf-paper); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(80, 50, 40, .2); padding: 12px 14px calc(12px + var(--safe-b)); display: grid; gap: 10px; }
.sf-decor-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sf-decor-head .sf-small { margin-right: auto; }
.sf-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sf-soft); }
.sf-seg button { border: 0; background: none; border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink-soft); }
.sf-seg button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.sf-palette { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.sf-palette button { flex: 0 0 auto; border: 0; border-radius: 16px; background: #fff7ee; box-shadow: inset 0 0 0 1px var(--sf-line); padding: 8px 10px; display: grid; justify-items: center; gap: 2px; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; min-width: 64px; }
.sf-palette .em { font-size: 22px; }
.sf-palette button.on { box-shadow: inset 0 0 0 2px var(--accent); background: #fff0ec; }
.sf-palette .sw { width: 30px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.sf-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sf-tools .sf-small { flex: 1 1 100%; }
.sf-tools button { border: 0; border-radius: 12px; background: #f4ece4; padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.sf-tools button.del { background: #ffe3de; color: #a2584f; margin-left: auto; }
.sf-decor > p { margin: 0; }
@media (max-width: 420px) { #sfDecorCount { display: none; } .sf-decor-head .sf-seg { margin-right: auto; } }

/* 시트 */
.sf-back { position: fixed; inset: 0; z-index: 29; background: rgba(60, 40, 30, .22); }
.sf-sheet { position: fixed; z-index: 30; left: 50%; bottom: 0; transform: translateX(-50%); width: min(480px, 100%); max-height: 82vh; overflow-y: auto; background: var(--sf-paper); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(60, 40, 30, .22); padding: 14px 18px calc(18px + var(--safe-b)); animation: sfUp .28s ease-out; overscroll-behavior: contain; }
@keyframes sfUp { from { transform: translate(-50%, 30px); opacity: 0; } }
.sf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sf-head h2 { margin: 0; font-size: 19px; }
.sf-x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--sf-soft); font-size: 22px; color: var(--ink-soft); cursor: pointer; }
.sf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sf-stack { display: grid; gap: 8px; }
.sf-look { margin: 4px 0 14px; }
.sf-sheet > #sfBody > .sf-small:first-child { margin: 0 0 6px; }
.sf-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.sf-field { display: grid; gap: 6px; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.sf-field i { font-style: normal; font-weight: 400; font-size: 12px; }
.sf-unk { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.sf-unk input { width: 16px; height: 16px; accent-color: #e8907f; margin: 0; }
.sf-line:disabled { opacity: 0.45; }
.sf-line { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--sf-line); background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.sf-paper { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--sf-line); background: #fff; font: inherit; font-size: 15px; line-height: 1.6; color: var(--ink); resize: vertical; }
.sf-who { display: flex; gap: 12px; align-items: flex-end; }
.sf-who .sf-field { flex: 1; }
.sf-photo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 3px 10px rgba(60, 40, 30, .18); flex: none; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chips button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--sf-line); padding: 6px 12px 6px 6px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.sf-chips.text button { padding: 8px 12px; }
.sf-chips button img { width: 34px; height: 34px; border-radius: 50%; }
.sf-chips button.on { box-shadow: inset 0 0 0 2px var(--accent); background: #fff0ec; font-weight: 700; }
.sf-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-swatches button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--sf-line); cursor: pointer; }
.sf-swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.sf-gifts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sf-gifts button { display: grid; justify-items: center; gap: 2px; border: 0; border-radius: 16px; background: #fff7ee; box-shadow: inset 0 0 0 1px var(--sf-line); padding: 10px 4px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.sf-gifts .em { font-size: 24px; }
.sf-card { padding: 14px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--sf-line); }
.sf-card-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.sf-card-head .sf-link { margin-left: auto; padding: 4px; }
.sf-memorial { margin: 8px 0 0; font-size: 15.5px; line-height: 1.75; white-space: pre-wrap; word-break: keep-all; }
.sf-memorial.empty { color: var(--ink-soft); }
.sf-badge { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: rgba(240, 143, 134, .14); color: #c0645c; font-size: 11.5px; font-weight: 700; }
.sf-badge.fam { background: rgba(169, 152, 230, .18); color: #7a68c0; }
.sf-badge.private { background: #efe7df; color: #7a6a62; }
.sf-vis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.sf-vis label { display: block; cursor: pointer; }
.sf-vis input { position: absolute; opacity: 0; }
.sf-vis span { display: block; padding: 8px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--sf-line); font-weight: 700; font-size: 14px; }
.sf-vis small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-soft); }
.sf-vis input:checked + span { box-shadow: inset 0 0 0 2px var(--accent); background: #fff0ec; }
.sf-teaser { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 10px; padding: 12px 14px; border: 0; border-radius: 16px; background: #fff4e6; font: inherit; color: var(--ink); cursor: pointer; }
.sf-teaser small { font-size: 14px; font-weight: 700; }
.sf-teaser span { color: #c0645c; font-weight: 700; font-size: 14px; }
.sf-teaser.unread { box-shadow: inset 0 0 0 2px #f6c1a8; }
.sf-msg-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.sf-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sf-list li { position: relative; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--sf-line); font-size: 14.5px; line-height: 1.55; word-break: keep-all; }
.sf-list li small { display: block; color: var(--ink-soft); font-size: 12px; }
.sf-list li.empty { color: var(--ink-soft); text-align: center; }
.sf-del { position: absolute; right: 8px; top: 6px; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.sf-guardians { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sf-guardians li { padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--sf-line); font-size: 14px; }
.sf-pets { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.sf-pets button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--sf-line); font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.sf-pets img { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.sf-pets span { flex: 1; display: grid; }
.sf-pets small { color: var(--ink-soft); font-size: 12.5px; }
.sf-pets em { font-style: normal; color: #c0645c; font-size: 13px; font-weight: 700; }
.sf-pets .empty { color: var(--ink-soft); text-align: center; padding: 12px; }
.sf-invite { display: flex; gap: 12px; align-items: center; }
.sf-invite .sf-hint { margin: 0; }

/* 아래 막대: 자리 고르기 · 마음 쉼터 · 토닥여 주기 */
.sf-pickbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); z-index: 26; width: min(440px, calc(100% - 24px)); background: var(--sf-paper); border-radius: 24px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 10px; }
.sf-pickbar p { margin: 0; font-weight: 700; text-align: center; line-height: 1.45; }
.sf-pickbar p small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 13px; }
.sf-pickbar .sf-row { margin: 0; justify-content: center; flex-wrap: wrap; gap: 8px; }
.sf-pickbar .sf-btn { min-height: 42px; padding: 0 14px; font-size: 14px; }

.sf-labels { position: fixed; inset: 0; pointer-events: none; z-index: 9; }
.sf-tag { position: absolute; left: 0; top: 0; padding: 4px 10px; border-radius: 999px; background: rgba(255, 244, 222, .94); color: #8a5a2a; font-size: 12.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 8px rgba(60, 40, 30, .2); }

/* 나루: 등 띄우기 단추, 등을 누르면 뜨는 작은 카드 */
.sf-lantern { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); z-index: 13; min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: #f08f86; color: #fff; font: inherit; font-size: 15px; font-weight: 700; box-shadow: 0 6px 18px rgba(200, 90, 70, .35); cursor: pointer; white-space: nowrap; }
.sf-lancard { position: fixed; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); z-index: 27; width: min(300px, calc(100% - 32px)); padding: 12px 16px; border-radius: 18px; background: var(--sf-paper); box-shadow: var(--shadow); text-align: center; }
.sf-lancard small { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.sf-lancard b { display: block; margin-top: 2px; font-size: 18px; }
.sf-lancard p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; word-break: keep-all; }
.sf-lan-kind .sf-btn { min-height: 52px; font-size: 16px; }

/* 마음 쉼터: 등불 켠 분 머리 위 반달 단추 셋 */
.sf-arc { position: fixed; left: 0; top: 0; z-index: 14; display: flex; align-items: flex-end; gap: 6px; padding-bottom: 6px; pointer-events: none; }
.sf-arc button { pointer-events: auto; width: 54px; height: 54px; border: 0; border-radius: 50%; background: var(--sf-paper); box-shadow: 0 4px 14px rgba(60, 40, 30, .25); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 0; cursor: pointer; font: inherit; color: var(--ink); animation: sf-pop .22s ease-out backwards; }
.sf-arc button:nth-child(2) { margin-bottom: 16px; animation-delay: .04s; }
.sf-arc button:nth-child(3) { animation-delay: .08s; }
.sf-arc span { font-size: 22px; line-height: 1.1; }
.sf-arc small { font-size: 9.5px; font-weight: 700; white-space: nowrap; }
@keyframes sf-pop { from { opacity: 0; transform: translateY(8px) scale(.7); } }
.sf-burst { position: absolute; font-style: normal; font-size: 20px; color: #f08f86; text-shadow: 0 0 6px rgba(255, 220, 180, .9); animation: sf-rise 1.4s ease-out forwards; }
.sf-burst:nth-child(3n) { color: #ffd27a; }
@keyframes sf-rise { from { opacity: 1; transform: translate(0, 0) scale(.6); } to { opacity: 0; transform: translate(var(--dx), -100px) scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .sf-view, .sf-sheet, .pulse, .sf-arc button, .sf-burst { animation: none; } }

/* 가로 휴대폰: 아래 막대는 오른쪽 세로줄로, 목도리·내 아이 자리로는 바닥 가운데, 안내 줄과 칸 수는 숨김 */
@media (orientation: landscape) and (max-height: 500px) {
  .sf-dock { left: auto; right: calc(10px + env(safe-area-inset-right, 0px)); top: calc(50% + 28px); bottom: auto; transform: translateY(-50%); width: auto; flex-direction: column; padding: 5px; gap: 2px; }
  .sf-dock button { padding: 6px 8px; font-size: 11.5px; }
  .sf-dock svg { width: 21px; height: 21px; }
  .bottom, body.touch .bottom { bottom: calc(12px + var(--safe-b)); right: calc(96px + env(safe-area-inset-right, 0px)); justify-content: center; }
  .hint, body.touch .hint, .count, body.touch .count { display: none; }
  /* 등 띄우기: 조이스틱(왼쪽 아래)과 오른쪽 세로줄 사이, 바닥 줄 바로 위 가운데 */
  .sf-lantern { left: calc(50% - 40px); bottom: calc(66px + var(--safe-b)); min-height: 40px; padding: 0 16px; font-size: 14px; }
  .sf-lancard { top: calc(56px + var(--safe-t)); }
  /* 봉안함 보기: 칸은 왼쪽에 화면 높이만큼, 이름표와 버튼은 가운데 줄, 메뉴는 오른쪽 세로줄 */
  .sf-view { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto auto 1fr; justify-items: center; column-gap: 14px; padding: calc(8px + var(--safe-t)) calc(14px + env(safe-area-inset-right, 0px)) calc(8px + var(--safe-b)) 12px; }
  .sf-stage { grid-column: 1; grid-row: 1 / 5; align-self: center; width: auto; height: min(calc(100dvh - 16px), calc((100vw - 390px) / 1.42)); max-height: none; margin: 0; }
  .sf-pill button { white-space: nowrap; padding: 7px 9px; }
  .sf-plate { grid-column: 2; grid-row: 2; }
  .sf-empty, .sf-controls { grid-column: 2; grid-row: 3; }
  .sf-bar { left: auto; right: calc(10px + env(safe-area-inset-right, 0px)); top: 50%; bottom: auto; transform: translateY(-50%); width: auto; flex-direction: column; padding: 5px; gap: 2px; }
  .sf-bar button { padding: 5px 8px; font-size: 11.5px; }
  .sf-view.decorating { padding-right: 312px; }
  .sf-view.decorating .sf-plate { display: none; }
  .sf-decor { left: auto; right: 0; top: 0; bottom: 0; transform: none; width: 300px; border-radius: 24px 0 0 24px; overflow-y: auto; align-content: start; }
  .sf-palette { flex-wrap: wrap; overflow: visible; order: 2; }
  .sf-tools { order: 1; }
  #sfDecorHint { order: 3; }
}
.sf-arc[hidden] { display: none; }

/* 위로 단추와 알림의 작은 그림 (선 그림, 글자색을 따른다) */
.sf-arc span svg { width: 24px; height: 24px; display: block; color: #c0645c; }
.toast .toast-ic svg { width: 1.3em; height: 1.3em; vertical-align: -0.3em; margin-right: 5px; color: #c0645c; }

/* 무지개다리로 (봉안 뒤 한 줄) · 아이 모습 만들기 */
.sf-bridge-go { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(255, 250, 241, .95); box-shadow: 0 3px 12px rgba(80, 50, 40, .14); color: #5b4232; font-size: 13.5px; }
.sf-bridge-go[hidden] { display: none; }
.sf-maker { display: flex; gap: 14px; align-items: flex-start; }
.sf-maker-pic { width: 128px; height: 128px; border-radius: 22px; flex: none; position: sticky; top: 0; background: linear-gradient(#fff6ea, #f3e3cf); box-shadow: 0 0 0 3px #fff, 0 3px 10px rgba(60, 40, 30, .18); }
.sf-maker-opts { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sf-maker .sf-chips { gap: 6px; }
.sf-maker .sf-chips.text button { padding: 6px 10px; font-size: 13px; }
@media (max-width: 420px) { .sf-maker { flex-direction: column; align-items: center; } }
@media (orientation: landscape) and (max-height: 500px) {
  .sf-bridge-go { grid-column: 2; grid-row: 4; align-self: start; flex-direction: column; gap: 6px; padding: 8px 12px; border-radius: 18px; font-size: 12.5px; }
  .sf-bridge-go span, .sf-bridge-go button { white-space: nowrap; }
  .sf-sheet:has(.sf-maker) { width: min(640px, 100%); }
}
.sf-maker-foot { position: sticky; bottom: calc(-18px - var(--safe-b)); margin: 10px -18px calc(-18px - var(--safe-b)); padding: 10px 18px calc(12px + var(--safe-b)); background: var(--sf-paper); box-shadow: 0 -6px 12px rgba(255, 250, 241, .9); }

/* 너에게 남기는 마음: 꿀빛 크림 종이 두 장 */
.sf-mind { margin-top: 12px; padding: 14px; border-radius: 20px; background: linear-gradient(#fff6e6, #fdebd0); box-shadow: inset 0 0 0 1px rgba(201, 150, 80, .22); }
.sf-mind:first-child { margin-top: 2px; }
.sf-mind-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sf-mind-head h3 { margin: 0; font-size: 15px; color: #7a4f2a; }
.sf-mind-head .sf-xs { margin-left: auto; }
.sf-xs { min-height: 30px; padding: 0 12px; font-size: 13px; }
.sf-mind-paper { padding: 12px 14px; border-radius: 14px; background: #fffdf8; box-shadow: 0 2px 8px rgba(160, 110, 60, .1); }
.sf-mind-paper .sf-memorial { margin: 0; }
.sf-mind-by { margin: 8px 0 0; text-align: right; color: #a77a4c; font-size: 12.5px; }
.sf-mind-input { margin-bottom: 4px; }
.sf-mind-list li { background: #fffdf8; box-shadow: 0 1px 4px rgba(160, 110, 60, .1); }

/* 아이 프로필 (사진을 누르면). 가로 화면에서는 오른쪽 패널 */
.sf-pf-tabs { margin-bottom: 10px; }
.sf-pf-top { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 6px; }
.sf-pf-top .sf-photo { width: 96px; height: 96px; border-radius: 20px; }
.sf-pf-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0; font-size: 14.5px; }
.sf-pf-info dt { color: var(--ink-soft); font-size: 13px; }
.sf-pf-info dd { margin: 0; font-weight: 600; }
.sf-pf-look { margin: 2px 0 6px; font-size: 14px; line-height: 1.55; color: #5b4232; word-break: keep-all; }
.sf-pf-foot { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sf-line); }
.sf-pf-foot:empty { display: none; }
.sf-warn { color: #b4534a; }
.sf-pf-ask { margin-top: 14px; padding: 12px; border-radius: 16px; background: #fff1ec; }
.sf-pf-ask p { margin: 0 0 10px; font-size: 14px; color: #6b3b33; }
.sf-btn.danger { background: #d9675d; color: #fff; }
@media (orientation: landscape) and (max-height: 500px) {
  .sf-sheet.side { left: auto; right: 0; top: 0; bottom: 0; transform: none; width: 330px; max-height: none; border-radius: 24px 0 0 24px; padding-top: calc(10px + var(--safe-t)); padding-right: calc(16px + env(safe-area-inset-right, 0px)); animation: sfSide .25s ease-out; }
}
@keyframes sfSide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
/* 봉안 직후 안내 팝업 */
.sf-welcome { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(40, 28, 24, .42); animation: sfFade .3s ease; }
.sf-welcome-card { width: min(360px, 100%); padding: 28px 24px 22px; border-radius: 24px; background: #fffaf1; box-shadow: 0 18px 50px rgba(40, 24, 16, .3); text-align: center; color: #4a3528; }
.sf-welcome-em { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.sf-welcome-card h2 { margin: 0 0 10px; font-size: 22px; font-weight: 800; }
.sf-welcome-card p { margin: 0 0 20px; font-size: 15.5px; line-height: 1.6; color: #6b5444; }
.sf-welcome-card .sf-btn { width: 100%; min-height: 50px; font-size: 16px; }
@keyframes sfFade { from { opacity: 0; } to { opacity: 1; } }
.sf-later { display: block; margin: 6px auto 0; font-size: 13px; }

/* 사물함 보기: 아래 버튼 줄 대신 왼쪽 위 돌아가기 + 추모글 카드 */
.sf-homebtn { position: fixed; top: calc(12px + var(--safe-t)); left: calc(12px + env(safe-area-inset-left, 0px)); z-index: 2; border: 0; border-radius: 999px; padding: 8px 14px; background: rgba(255, 250, 241, .92); box-shadow: 0 3px 12px rgba(80, 50, 40, .16); font: inherit; font-size: 14px; font-weight: 700; color: #6b4b31; cursor: pointer; }
.sf-homebtn:hover { background: #fff6ea; }
.sf-memo { display: flex; flex-direction: column; gap: 5px; width: min(420px, 100%); padding: 11px 16px; border: 1.5px solid #e2cba6; border-radius: 14px; background: linear-gradient(#fffdf8, #fbf1e2); box-shadow: 0 3px 12px rgba(80, 50, 40, .12); font: inherit; text-align: left; color: #4a3626; cursor: pointer; }
.sf-memo:hover { border-color: #d0ad78; }
.sf-memo-t { font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
.sf-memo-t.empty { color: #9a8370; }
.sf-memo-h { font-size: 12.5px; font-weight: 800; color: #b0624a; }
.sf-memo-meta { font-size: 12.5px; color: #8a6a4c; font-weight: 600; }
@media (max-width: 720px) { .sf-memo { padding: 9px 13px; } .sf-memo-t { font-size: 14px; } }
/* 사물함 보기 비교 '바깥과 같게': 바깥과 같은 장을 그리는 캔버스 (가장자리는 배경 속으로 부드럽게). 누르기는 위의 #sfCanvas가 받는다 */
.sf-v1canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 72% 76% at 50% 50%, #000 80%, transparent 100%); mask-image: radial-gradient(ellipse 72% 76% at 50% 50%, #000 80%, transparent 100%); }
.sf-v1canvas[hidden] { display: none; }
.sf-stage canvas#sfCanvas { position: relative; }
/* 프로필: 안쪽 벽 · 액자 고르기 (작은 색 견본) */
.sf-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-swatches button { width: 34px; height: 34px; border-radius: 10px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(90, 60, 40, .25); }
.sf-swatches button.on { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px #e08a6e; }
/* 칸 안 글 카드를 누르면 패널의 글이 잠깐 밝아진다 */
.sf-mind.sf-flash .sf-mind-paper { animation: sfFlash 1.4s ease-out; }
@keyframes sfFlash { 0%, 35% { box-shadow: 0 0 0 3px rgba(226, 172, 92, .6), 0 2px 8px rgba(160, 110, 60, .1); } 100% { box-shadow: 0 2px 8px rgba(160, 110, 60, .1); } }
/* 가로 휴대폰 중 높이가 낮은 화면(예: 플립7 가로 + 주소창, 약 960×340): 겹침 정리 (사용자 11/3)
   세로 메뉴는 위쪽 단추 줄(하늘 보기 · 후원하기) 아래에서 시작, ♪는 세로 메뉴 왼쪽, 위쪽 안내 줄은 숨김 */
@media (orientation: landscape) and (max-height: 480px) {
  .sf-dock { top: calc(116px + var(--safe-t)); transform: none; padding: 4px; gap: 0; }
  .sf-dock button { padding: 4px 7px; font-size: 11px; }
  .sf-dock svg { width: 18px; height: 18px; }
  .clock-line, body.touch .clock-line { display: none; }
  #bgmBtn { top: calc(116px + var(--safe-t)) !important; right: calc(96px + env(safe-area-inset-right, 0px)) !important; bottom: auto !important; }
}

/* 구름 위 마을 단추 (봉안 뒤부터, 메뉴 아래 둥실) · 사용자 11/3 */
.sf-cloudbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 14px 8px 10px; background: linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(255, 236, 244, .94)); color: #6d4a5e; font: inherit; font-size: 13.5px; font-weight: 700; box-shadow: 0 6px 18px rgba(120, 80, 110, .22), inset 0 0 0 1px rgba(255, 255, 255, .8); cursor: pointer; animation: sfCloudBob 4.2s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.sf-cloudbtn[hidden] { display: none; }
.sf-cloudbtn .sf-cloud-em { font-size: 18px; line-height: 1; }
.sf-cloudbtn:active { transform: scale(.96); }
.sf-cloudbtn.fresh { animation: sfCloudBob 4.2s ease-in-out infinite, sfCloudGlow 1.6s ease-in-out 3; }
@keyframes sfCloudBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes sfCloudGlow { 0%, 100% { box-shadow: 0 6px 18px rgba(120, 80, 110, .22), 0 0 0 0 rgba(255, 214, 236, 0); } 50% { box-shadow: 0 6px 18px rgba(120, 80, 110, .22), 0 0 0 10px rgba(255, 214, 236, .55); } }
@media (prefers-reduced-motion: reduce) { .sf-cloudbtn, .sf-cloudbtn.fresh { animation: none; } }

/* 홈 화면에 두기 한 줄 띠 (첫 편지 뒤 1번, 다른 날 1번) · 사용자 11/3 '간단하게' */
.sf-a2hs { position: fixed; left: 50%; top: calc(74px + var(--safe-t, 0px)); z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 6px 6px 6px 8px; border-radius: 999px; background: rgba(255, 250, 242, .97); color: #5a4038; font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 24px rgba(60, 40, 30, .22); animation: sfA2hsIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.sf-a2hs.out { animation: sfA2hsOut .26s ease both; }
.sf-a2hs img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.sf-a2hs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: keep-all; }
.sf-a2hs-yes { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: linear-gradient(100deg, #f49a8f, #f6a77d); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.sf-a2hs-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(120, 90, 70, .08); color: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
@keyframes sfA2hsIn { from { opacity: 0; transform: translate(-50%, -14px); } }
@keyframes sfA2hsOut { to { opacity: 0; transform: translate(-50%, -14px); } }

.sf-btn.link { background: none; box-shadow: none; color: #8a6a5a; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 8px 12px; }
