/* 앱 스타일시트 (T018) — 시안 docs/design/prototype-template.html 의 <style>과 줄마다의 style= 을 옮겼다.
   CSP style-src 'self' 아래서 돌도록 인라인 스타일을 쓰지 않는다(plan 함정 P1 — CSP를 풀지 않는다, 모양은 바꾸지 않는다).
   "시안 N줄"은 그 시안 파일의 줄 번호다. 변하는 값은 클래스로 못 박지 않고 JS가 el.style 로 넣거나,
   값이 몇 개뿐이면 is-… 상태 클래스로 바꿔 끼운다. */

/* ── 글꼴 (T019 — 자체 서빙 서브셋, 외부 주소 없음) ── */
@font-face {
  font-family: "Gowun Dodum";
  src: url("../fonts/GowunDodum-Regular.subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* 함렛은 가변 글꼴(wght 400~600)이라 파일 하나로 시안의 400·600을 낸다 */
@font-face {
  font-family: "Hahmlet";
  src: url("../fonts/Hahmlet.subset.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ── 시안 398~407줄: 전역 규칙과 움직임 (그대로) ── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: #DCE4D5; font-family: "Gowun Dodum", sans-serif; color: #1E2A20; }
a { color: #4A7A54; text-decoration: none; }
a:hover { color: #1E2A20; }
input, button { font-family: inherit; color: inherit; }
input:focus { outline: none; }
::-webkit-scrollbar { width: 0; height: 0; }
@keyframes pulseHeart { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shakeRow { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* ════════ 공통 ════════ */

/* 시안 410줄: 앱 틀. 시안의 --accent 는 디자인 도구의 고르기 값이었고 기본값(#4A7A54)을 여기 고정한다 */
.frame { --accent: #4A7A54; width: 390px; min-height: 844px; margin: 0 auto; background: #F1F5EB; position: relative; overflow: hidden; box-shadow: 0 30px 80px rgba(30,42,32,0.2); }

/* 시안 412줄: 바탕의 가는 가로줄 무늬 */
.scanlines { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; background-image: repeating-linear-gradient(0deg, rgba(30,42,32,0.035) 0 1px, transparent 1px 4px); }

/* 시안 415·472·526줄: 탭 화면 한 장 (우리·달력·설정) */
.screen { position: relative; padding: 44px 22px 120px; animation: riseIn 0.35s ease both; }

/* 시안 441·452·531·538·547·561줄: 테두리 있는 밝은 카드의 공통 부분 — 아래 milestone·soon·profile·rows 와 함께 쓴다 */
.card { border: 1px solid rgba(30,42,32,0.14); border-radius: 14px; background: #F9FCF4; }

/* 시안 442·453·492줄: 양 끝 정렬 한 줄 */
.row-between { display: flex; align-items: baseline; justify-content: space-between; }

/* 시안 443·493줄: 함렛 15px 소제목 (다음 기념일 이름, 고른 날) */
.title-sm { font-family: 'Hahmlet', serif; font-size: 15px; font-weight: 600; }

/* 시안 461·501줄: 목록 줄의 제목 (가운데를 채운다) */
.item-title { font-size: 13.5px; flex: 1; }

/* 시안 419·426·533·540·591·594줄: 사진. 변하는 값: transform — JS el.style (사진별 이동·확대) */
.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 시안 419·533·591줄 / 426·540·594줄: 첫째·둘째 자리 사진의 기준점 (시안 사진에 맞춘 값) */
.photo-a { object-position: 50% 38%; }
.photo-b { object-position: 56% 30%; }

/* ════════ 우리(홈) 화면 ════════ */

/* 시안 416줄: 두 사람 사진 줄 */
.couple { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 10px 0 10px; }
/* 시안 417·424줄: 사진 + 이름 한 묶음 */
.person { display: flex; flex-direction: column; align-items: center; gap: 8px; }
/* 시안 418·425줄: 기울어진 사진 틀 — 첫째 자리는 왼쪽(-2.5도), 둘째 자리는 오른쪽(+2.5도) */
.polaroid { width: 120px; height: 148px; border-radius: 4px; border: 1px solid rgba(30,42,32,0.2); overflow: hidden; }
.polaroid.tilt-left { transform: rotate(-2.5deg); }
.polaroid.tilt-right { transform: rotate(2.5deg); }
/* 시안 421·428줄: 사진 아래 이름 */
.person-name { font-size: 12px; color: rgba(30,42,32,0.62); }
/* 시안 424줄: 두 사진 사이 뛰는 하트 — 사진 높이 가운데쯤(시안 50px → 84px, 2026-10-17 사용자) */
.couple-heart { font-size: 20px; color: #D2717C; padding-bottom: 84px; animation: pulseHeart 2.6s ease-in-out infinite; }

/* 시안 432줄: 함께한 날 덩어리 */
.count { text-align: center; margin-top: 30px; }
/* 시안 433줄: «함께한 날» */
.count-label { font-size: 11px; letter-spacing: 0.16em; color: rgba(30,42,32,0.5); }
/* 시안 434줄: 숫자 + «일째» 줄 */
.count-row { display: flex; align-items: baseline; justify-content: center; gap: 5px; margin-top: 8px; }
/* 시안 435줄: 날 수 */
.count-num { font-family: 'Hahmlet', serif; font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
/* 시안 436줄: «일째» */
.count-unit { font-family: 'Hahmlet', serif; font-size: 17px; font-weight: 400; color: rgba(30,42,32,0.6); }
/* 시안 438줄: 사귄 날 «YYYY. MM. DD ~» */
.count-since { font-size: 12px; color: rgba(30,42,32,0.55); margin-top: 10px; }

/* 시안 441줄: 다음 기념일 카드 (.card 와 함께) */
.milestone { margin-top: 30px; padding: 16px 18px; }
/* 시안 444줄: «N일 남음» */
.milestone-left { font-size: 12px; color: var(--accent, #4A7A54); }
/* 시안 446줄: 진행 막대 바탕 */
.bar { height: 6px; border-radius: 999px; background: rgba(30,42,32,0.09); margin-top: 12px; overflow: hidden; }
/* 시안 447줄: 진행 막대 채움. 변하는 값: width — JS el.style */
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent, #4A7A54); }
/* 시안 449줄: 다음 기념일 날짜 */
.milestone-date { font-size: 11.5px; color: rgba(30,42,32,0.55); margin-top: 10px; }

/* 시안 452줄: «다가오는 30일» 카드 — 누르면 달력으로 가는 단추 (.card 와 함께) */
.soon { width: 100%; text-align: left; margin-top: 12px; padding: 16px 18px; cursor: pointer; }
/* 시안 454줄: «다가오는 30일» */
.soon-label { font-size: 10.5px; letter-spacing: 0.12em; color: rgba(30,42,32,0.5); }
/* 시안 455줄: «N개» */
.soon-count { font-size: 10.5px; color: rgba(30,42,32,0.4); }
/* 시안 457줄: 일정 목록 */
.soon-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
/* 시안 459줄: 일정 한 줄 (날짜 · 제목 · 남은 날) — 제목은 .item-title */
.soon-row { display: flex; align-items: baseline; gap: 10px; }
/* 시안 460줄(홈, 54px)·516줄(달력, 56px): 고정폭 글꼴 날짜 */
.soon-date, .up-date { font-family: ui-monospace, monospace; font-size: 11px; color: rgba(30,42,32,0.5); flex: none; }
.soon-date { width: 54px; }
.up-date { width: 56px; }
/* 시안 462줄: «D-N»·«오늘». 시안의 color {{ s.leftColor }} 는 두 값뿐 — 보통 일정은 강조색, 기념일은 .is-ms(분홍) */
.soon-left { font-size: 11px; color: var(--accent, #4A7A54); }
.soon-left.is-ms { color: #D2717C; }
/* 시안 466줄: «30일 안에는 아무 일정도 없어요» */
.soon-empty { font-size: 12px; color: rgba(30,42,32,0.45); margin-top: 10px; }

/* ════════ 달력 화면 ════════ */

/* 시안 473줄: 달 넘기기 줄 */
.month-nav { display: flex; align-items: center; justify-content: space-between; }
/* 시안 474·476줄: ‹ › 둥근 단추 */
.month-btn { border: 1px solid rgba(30,42,32,0.16); background: transparent; width: 30px; height: 30px; border-radius: 999px; cursor: pointer; font-size: 13px; }
/* 시안 475줄: «YYYY년 M월» */
.month-label { font-family: 'Hahmlet', serif; font-size: 20px; font-weight: 600; }
/* 시안 478줄(요일 머리, 위 여백 18px)·483줄(날짜 칸): 7칸 격자 */
.week-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.week-head { margin-top: 18px; }
/* 시안 480줄: 요일 이름 */
.weekday { text-align: center; font-size: 10.5px; color: rgba(30,42,32,0.45); padding-bottom: 6px; }
/* 시안 485줄: 날짜 칸 단추. 시안의 background {{ c.bg }} 는 세 값 — 기본 투명, 오늘 .is-today, 고른 날 .is-selected */
.day { position: relative; aspect-ratio: 1 / 1.05; border: none; background: transparent; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.day.is-today { background: rgba(30,42,32,0.07); }
.day.is-selected { background: var(--accent, #4A7A54); }
/* 시안 486줄: 날짜 숫자. 시안의 color {{ c.fg }} — 고른 날이면 밝은 글자 */
.day-num { font-size: 13px; color: rgba(30,42,32,0.85); }
.day.is-selected .day-num { color: #F4F8EE; }
/* 시안 487줄: 날짜 아래 표시(기념일 ♥ / 일정 •). 시안의 font-size {{ c.markSize }}·color {{ c.dot }} 는
   기념일 .is-ms(10px 분홍) / 일정 .is-event(13px 강조색) / 없음(투명), 고른 날이면 더 밝은 색 */
.day-mark { height: 10px; line-height: 10px; font-size: 10px; color: transparent; }
.day-mark.is-ms { font-size: 10px; color: #D2717C; }
.day-mark.is-event { font-size: 13px; color: var(--accent, #4A7A54); }
.day.is-selected .day-mark.is-ms { color: #FFD2D7; }
.day.is-selected .day-mark.is-event { color: #F1F5EB; }

/* 시안 492줄: 고른 날 머리줄 (.row-between 과 함께, 제목은 .title-sm) */
.day-head { margin-top: 22px; }
/* 시안 494줄: «N개»·«텅 비었음» */
.day-count { font-size: 11px; color: rgba(30,42,32,0.5); }
/* 시안 497줄: 고른 날의 일정 목록 */
.event-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
/* 시안 499줄: 일정 카드 (제목은 .item-title) */
.event { border: 1px solid rgba(30,42,32,0.14); border-radius: 12px; background: #F9FCF4; padding: 13px 15px; display: flex; align-items: center; gap: 12px; }
/* 시안 500줄: 일정 앞 점 */
.event-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent, #4A7A54); flex: none; }
/* 시안 502줄: «지움» */
.event-del { border: none; background: transparent; cursor: pointer; font-size: 12px; color: rgba(30,42,32,0.38); }
/* 시안 507줄: 일정 넣기 줄 */
.add-row { margin-top: 14px; display: flex; gap: 8px; }
/* 시안 508줄: «이 날 뭐하기로 했지?» 입력칸 */
.add-input { flex: 1; border: 1px solid rgba(30,42,32,0.18); border-radius: 12px; background: transparent; padding: 12px 14px; font-size: 13px; }
/* 시안 509줄: «추가» */
.add-btn { border: none; border-radius: 12px; background: var(--accent, #4A7A54); color: #F4F8EE; padding: 0 18px; font-size: 13px; cursor: pointer; }
/* 시안 512줄: «앞으로의 날들» */
.section-label { margin-top: 24px; font-size: 10.5px; letter-spacing: 0.12em; color: rgba(30,42,32,0.45); }
/* 시안 513줄: 앞으로의 날들 목록 */
.up-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
/* 시안 515줄: 한 줄 (날짜는 위 .up-date) */
.up-row { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid rgba(30,42,32,0.09); }
/* 시안 517줄: 제목 */
.up-title { font-size: 13px; flex: 1; }
/* 시안 518줄: «D-N» (시안은 기념일도 강조색) */
.up-left { font-size: 11px; color: var(--accent, #4A7A54); }

/* ════════ 설정(우리 방) 화면 ════════ */

/* 시안 527줄: «우리 방 설정» */
.page-title { font-family: 'Hahmlet', serif; font-size: 22px; font-weight: 600; }
/* 시안 528줄: 제목 아래 한 줄 */
.page-sub { font-size: 12px; color: rgba(30,42,32,0.55); margin-top: 6px; }
/* 시안 530줄: 두 사람 카드 2칸 */
.profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
/* 시안 531·538줄: 한 사람 카드 (.card 와 함께) */
.profile { padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* 시안 532·539줄: 둥근 사진 틀 (안의 img 는 .photo) */
.avatar { width: 78px; height: 78px; border-radius: 999px; border: 1px solid rgba(30,42,32,0.2); overflow: hidden; }
/* 시안 535·542줄: 이름 */
.profile-name { font-size: 13px; font-weight: 600; }
/* 시안 536·543줄: «사진 바꾸기» 알약 단추 */
.pill-btn { border: 1px solid rgba(30,42,32,0.2); border-radius: 999px; background: transparent; font-size: 11px; padding: 6px 12px; cursor: pointer; }

/* 시안 547·561줄: 설정 줄 묶음 카드 (.card 와 함께) */
.rows { margin-top: 16px; overflow: hidden; }
/* 시안 562·571줄: 줄 전체가 단추인 켜고 끄기 줄 (.setting-row 와 함께) — 아래 .setting-row 구분선이 이 border 를 이긴다 */
.toggle-row { width: 100%; text-align: left; border: none; background: transparent; cursor: pointer; }
/* 시안 548·552·562·571줄: 설정 한 줄. 시안은 마지막 줄만 아래 구분선이 없다 */
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; }
.setting-row:not(:last-child) { border-bottom: 1px solid rgba(30,42,32,0.09); }
/* 시안 549·554·564·573줄: 설정 이름 */
.setting-label { font-size: 13px; }
/* 시안 550줄: 설정 값 (사귄 날) */
.setting-value { font-size: 13px; color: rgba(30,42,32,0.6); }
/* 시안 555·565·574줄: 설정 이름 아래 설명 */
.setting-hint { font-size: 11px; color: rgba(30,42,32,0.5); margin-top: 3px; }
/* 시안 557줄: «••••••» */
.pin-mask { font-family: ui-monospace, monospace; font-size: 14px; letter-spacing: 0.16em; color: rgba(30,42,32,0.4); }
/* 시안 567·576줄: 스위치 바탕. 시안의 background {{ lockTrackBg }}·{{ notifyTrackBg }} 는 두 값 — 켜짐 .is-on */
.switch { width: 42px; height: 24px; border-radius: 999px; background: rgba(30,42,32,0.18); position: relative; flex: none; display: block; }
.switch.is-on { background: var(--accent, #4A7A54); }
/* 시안 568·577줄: 스위치 손잡이. 시안의 left {{ …KnobLeft }} 는 3px / 켜짐 21px */
.switch-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #F9FCF4; transition: left 0.18s ease; }
.switch.is-on .switch-knob { left: 21px; }
/* 시안 582줄: 맨 아래 작은 글 */
.footnote { margin-top: 22px; text-align: center; font-size: 11px; color: rgba(30,42,32,0.4); line-height: 1.7; }

/* ════════ 사진 편집기 (설정 위에 덮는 판) ════════ */

/* 시안 587줄: 어두운 덮개 */
.editor { position: absolute; inset: 0; z-index: 30; background: rgba(20,28,21,0.92); display: flex; flex-direction: column; align-items: center; padding: 64px 22px 34px; animation: riseIn 0.22s ease both; }
/* 시안 588줄: «… 사진 바꾸기» */
.editor-title { font-family: 'Hahmlet', serif; font-size: 17px; font-weight: 600; color: #F1F5EB; }
/* 시안 589줄: 끌고 확대하는 무대 */
.editor-stage { position: relative; width: 240px; height: 296px; margin-top: 20px; overflow: hidden; border-radius: 4px; background: #10160F; touch-action: none; cursor: grab; }
/* 시안 591·594줄: 무대 안 사진 — .photo·.photo-a/.photo-b 와 함께. 변하는 값: transform — JS el.style */
.editor-photo { user-select: none; -webkit-user-select: none; pointer-events: none; }
/* 시안 596줄: 3등분 안내선 덮개 */
.guides { position: absolute; inset: 0; pointer-events: none; }
/* 시안 597·598줄: 세로 안내선 / 599·600줄: 가로 안내선 */
.guide-v1, .guide-v2 { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.55); }
.guide-v1 { left: 33.333%; }
.guide-v2 { left: 66.666%; }
.guide-h1, .guide-h2 { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.55); }
.guide-h1 { top: 33.333%; }
.guide-h2 { top: 66.666%; }
/* 시안 601줄: 바깥 테두리 */
.guide-frame { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,0.7); }
/* 시안 605줄: 취소·완료 줄 */
.editor-actions { display: flex; gap: 10px; width: 240px; margin-top: 24px; }
/* 시안 606줄: «취소» */
.editor-cancel { flex: 1; border: 1px solid rgba(241,245,235,0.28); border-radius: 12px; background: transparent; color: #F1F5EB; padding: 13px; font-size: 13px; cursor: pointer; }
/* 시안 607줄: «완료» (시안의 background {{ accent }} = 강조색) */
.editor-save { flex: 1; border: none; border-radius: 12px; background: var(--accent, #4A7A54); color: #F4F8EE; padding: 13px; font-size: 13px; cursor: pointer; }
/* 시안 609줄: «처음 상태로» */
.editor-reset { margin-top: 14px; border: none; background: transparent; color: rgba(241,245,235,0.45); font-size: 11.5px; cursor: pointer; }

/* ════════ 잠금 화면 ════════ */

/* 시안 614줄: 잠금 판 전체 */
.lock { position: absolute; inset: 0; z-index: 20; background: #1E2A20; color: #F1F5EB; display: flex; flex-direction: column; align-items: center; padding: 120px 40px 40px; animation: riseIn 0.25s ease both; }
/* 시안 615줄: ♥ */
.lock-heart { font-size: 22px; color: #D2717C; }
/* 시안 616줄: «둘만의 방» */
.lock-title { font-family: 'Hahmlet', serif; font-size: 19px; font-weight: 600; margin-top: 16px; }
/* 시안 617줄: 비밀번호 힌트 */
.lock-hint { font-size: 12px; color: rgba(241,245,235,0.55); margin-top: 8px; text-align: center; line-height: 1.6; }
/* 시안 618줄: 여섯 점 줄. 시안의 animation {{ shake }} 는 틀렸을 때만 — .is-wrong */
.pin-dots { display: flex; gap: 10px; margin-top: 24px; }
.pin-dots.is-wrong { animation: shakeRow 0.32s ease; }
/* 시안 620줄: 점 하나. 시안의 background {{ d.bg }} 는 채워짐 .is-filled, border {{ d.border }} 는 틀렸을 때 분홍 */
.pin-dot { width: 10px; height: 10px; border-radius: 999px; background: transparent; border: 1px solid rgba(241,245,235,0.4); }
.pin-dot.is-filled { background: #F1F5EB; }
.pin-dots.is-wrong .pin-dot { border-color: rgba(229,138,148,0.8); }
/* 시안 623줄: «그 날이 아니야. 다시.» */
.lock-error { height: 16px; margin-top: 12px; font-size: 11.5px; color: #E58A94; }
/* 시안 624줄: 숫자판 3칸 */
.keypad { display: grid; grid-template-columns: repeat(3, 64px); gap: 13px; margin-top: 10px; }
/* 시안 626줄: 숫자 단추 */
.key { height: 64px; border-radius: 999px; border: 1px solid rgba(241,245,235,0.18); background: transparent; color: #F1F5EB; font-size: 19px; font-family: 'Hahmlet', serif; cursor: pointer; }

/* ════════ 아래 탭 막대 ════════ */

/* 시안 636줄: 탭 막대 (iOS 17은 backdrop-filter 에 -webkit- 접두사가 있어야 흐려진다) */
.tabbar { position: absolute; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(241,245,235,0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid rgba(30,42,32,0.12); padding: 10px 8px 22px; }
/* 시안 637·641·645줄: 탭 단추. 시안의 color {{ homeFg }}·{{ calFg }}·{{ usFg }} 는 두 값 — 지금 탭 .is-active */
.tab { border: none; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; color: rgba(30,42,32,0.38); }
.tab.is-active { color: var(--accent, #4A7A54); }
/* 시안 638·642·646줄: 탭 그림(♥ ▤ ◐) */
.tab-icon { font-size: 16px; }
/* 시안 639·643·647줄: 탭 이름 */
.tab-label { font-size: 12.5px; }

/* ── 움직임 줄이기 (R22) — 시안의 등장·하트·흔들림·스위치 움직임을 끈다. 틀린 비밀번호는 .lock-error 글자로 전한다 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ════════ 시안에 없던 화면 (합의로 더함 — 명세 «시안에 없던 것») ════════ */

/* 첫 자리 열기(/claim) — 입력은 시안의 .add-input·.setting-label 을 쓰고 세로로 쌓기만 한다 */
.claim-form, .claim-setup { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; border: none; padding: 0; }
.claim-setup[hidden], .claim-form[hidden] { display: none; }
.claim-error { height: auto; min-height: 16px; }
.claim-submit { padding: 14px 18px; }

/* 실제 폰 맞춤(디자인 변경 아님) — 시안의 .frame 은 390px 폰 틀 모형이라, 375~430px 아이폰에서 옆으로 넘치지 않게
   화면 너비를 그대로 쓰고 그림자를 뺀다. 내용이 화면보다 길어도 탭 막대가 화면 아래에 붙어 있게 fixed 로 둔다 */
@media (max-width: 430px) {
  .frame { width: 100%; min-height: 100dvh; box-shadow: none; }
  .tabbar { position: fixed; }
}

/* 글자로 전하는 오류·연결 상태(R22 — role="alert"). 밝은 바탕에서 읽히게 시안 분홍보다 진하게. 비면 자리를 안 차지한다 */
.alert-text { margin: 12px 0 0; font-size: 12px; color: #A33A47; }
.alert-text:empty { display: none; }
/* «다시 보내기» — 오류 글 옆 단추(누르는 곳 24px 이상) */
.retry-btn { min-height: 28px; margin-left: 6px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font-size: 11.5px; padding: 0 10px; cursor: pointer; }

/* 방 화면 위 띠 — 허락 대기(FR-007)·안 본 소식. 카드는 .card 와 함께, 글은 .item-title, 단추는 .add-btn·.pill-btn */
.banner { position: relative; z-index: 2; padding: 0 22px; }
.banner-card { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 14px; }
.banner-card button { min-height: 32px; }

/* 달력을 <table> 로(R22) — 시안 478·483줄의 7칸 격자(간격 2px·위 여백 18px)와 같은 모양이 되게 */
.cal-table { width: calc(100% + 4px); margin: 16px -2px 0; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.cal-table th { font-weight: 400; padding: 0 0 6px; }
.cal-table td { padding: 0; }
.cal-table .day { width: 100%; }
/* 제목을 h1·h2 로 둔 곳 — 브라우저 기본 여백만 지운다(시안은 div). 첫 자리 열기 화면의 제목은 건드리지 않게 설정 탭만 */
.month-label, .title-sm, .editor-title, #tab-us .page-title { margin: 0; }
/* «지움» — 시안 모양 그대로, 누르는 곳만 24px 이상(R22) */
.event-del { min-width: 32px; min-height: 32px; }

/* 설정 «초대하기» 줄 — 단추 안이라 span 으로 쓴 이름·설명을 줄 바꿈 */
.toggle-row .setting-label, .toggle-row .setting-hint { display: block; }
/* 초대 주소와 복사·공유 */
.invite-out { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.invite-out:empty { display: none; }
.invite-url { font-size: 12px; font-family: ui-monospace, monospace; }
.invite-actions { display: flex; gap: 8px; }
.invite-actions .pill-btn { min-height: 32px; }
.invite-out .setting-hint { margin: 0; }

/* 초대 첫 화면(/i) — 시안 잠금 판(.lock·.pin-dots·.keypad) 위에 진짜 입력칸과 «시작하기»를 더한다 */
.kakao-note { margin: 0 0 24px; padding: 10px 12px; border: 1px solid rgba(241,245,235,0.3); border-radius: 12px; color: #F1F5EB; }
.kakao-note[hidden] { display: none; }
/* 잠금 판은 틀 위에 absolute 로 덮여 틀의 높이를 못 늘린다 — 작은 폰(667px)에서 숫자판·«시작하기»가 잘리지 않게
   초대 화면에서만 판이 내용만큼 자라게 한다(틀의 최소 높이는 그대로 물려받는다) */
#invite .lock { position: relative; min-height: inherit; }
.invite-body { display: flex; flex-direction: column; align-items: center; }
.invite-form { display: flex; flex-direction: column; align-items: center; }
/* 16px — 아이폰이 입력칸을 누를 때 화면을 확대하지 않는 크기 */
.pin-input { width: 180px; margin-top: 20px; padding: 10px; border: 1px solid rgba(241,245,235,0.3); border-radius: 12px; background: transparent; color: #F1F5EB; font-size: 16px; text-align: center; letter-spacing: 0.3em; }
.invite-form .pin-dots { justify-content: center; }
.invite-error { height: auto; min-height: 16px; text-align: center; }
.invite-start { flex: none; width: 240px; margin-top: 22px; }
.invite-start:disabled { opacity: 0.5; }
.lock .pill-btn { margin-top: 20px; min-height: 32px; border-color: rgba(241,245,235,0.3); }

/* 홈 화면 추가 안내(FR-010 · 함정 P15) — 덮개는 시안 사진 편집기(.editor)의 모양을 빌린다 */
.a2hs { z-index: 40; align-items: stretch; padding: 56px 28px 34px; }
.a2hs-sub { margin: 8px 0 0; font-size: 12px; color: rgba(241,245,235,0.6); }
.a2hs-steps { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; color: #F1F5EB; font-size: 13px; }
.a2hs-step { display: flex; gap: 12px; }
.a2hs-num { flex: none; width: 22px; height: 22px; border-radius: 999px; background: rgba(241,245,235,0.14); font-size: 11px; line-height: 22px; text-align: center; }
.a2hs-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: rgba(241,245,235,0.75); }
.a2hs-step > div > .a2hs-line:first-child { margin-top: 0; }
.a2hs-close { flex: none; margin-top: auto; }
/* 그림 상자 — 글자 기호(⋯ +)나 아래 공유 상자를 담는다 */
.pict { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid rgba(241,245,235,0.4); border-radius: 8px; color: #F1F5EB; font-size: 18px; line-height: 1; }
/* 공유 그림: 위가 트인 네모 + 위로 나가는 화살표(iOS 공유 단추 모양) */
.pict-share { position: relative; width: 14px; height: 12px; margin-top: 6px; border: 1.5px solid currentColor; border-top-color: transparent; border-radius: 2px; }
.pict-share::before { content: ""; position: absolute; left: 50%; top: -9px; width: 1.5px; height: 12px; background: currentColor; transform: translateX(-50%); }
.pict-share::after { content: ""; position: absolute; left: 50%; top: -9px; width: 5px; height: 5px; border-left: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: translateX(-50%) rotate(45deg); }

/* 설정 «사귄 날» 바꾸기(US3) — 시안 550줄의 값 자리에 날짜 칸 + «저장». 칸은 .setting-value 글자 모양, 16px 은 아이폰이 확대하지 않는 크기 */
.anniv-edit { display: flex; align-items: center; gap: 8px; }
.anniv-input { border: none; background: transparent; font-size: 16px; min-height: 32px; text-align: right; }
.anniv-edit .pill-btn, .profile .pill-btn { min-height: 32px; }
.anniv-ok { margin: 8px 0 0; }
.anniv-ok:empty { display: none; }

/* 사진 편집기의 접근성 대안(R22) — 사진 고르기·확대 −/+·화살표 이동. 어두운 판 위라 밝은 테두리·글자(.lock .pill-btn 과 같은 결) */
.editor-tools { display: flex; align-items: center; justify-content: center; gap: 8px; width: 240px; margin-top: 14px; }
.editor .pill-btn { min-height: 32px; border-color: rgba(241,245,235,0.3); color: #F1F5EB; }
/* 어두운 판 위 오류 글 — 시안 잠금 판의 분홍(.lock-error) */
.editor-error { width: 240px; text-align: center; color: #E58A94; }
.editor-reset { min-height: 32px; }
.editor-save:disabled { opacity: 0.5; }

/* 방 화면의 잠금 판(T064) — 잠긴 동안 틀 안의 다른 것은 감춘다(이름·사진이 판 뒤에도, 화면 읽기에도 안 남게).
   판은 틀을 덮는 대신 틀 안에 서서 내용만큼 자란다 — 작은 폰(667px)에서 숫자판이 잘리지 않게(초대 화면과 같은 까닭) */
.frame.is-locked > :not(.lock) { display: none; }
.frame.is-locked > .lock { position: relative; min-height: inherit; }
.lock-left:empty { display: none; }
.key:disabled, .pin-input:disabled { opacity: 0.4; cursor: default; }

/* 설정 «방 입장 비밀번호» 바꾸기 칸 — 쌓기는 .claim-form, 칸은 .add-input. 16px 은 아이폰이 확대하지 않는 크기 */
.pin-change .add-input { font-size: 16px; }
.pin-change .alert-text, .pin-change .anniv-ok { margin: 0; }
.hint-toggle { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; }
.hint-toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent, #4A7A54); }
.hint-box { margin-top: 0; }
.hint-box .setting-hint { margin: 0; }
.pin-mask { flex: none; }

/* 자리 비우기 확인 대화 — 덮개는 사진 편집기(.editor)의 모양을 빌린다 */
.confirm-text { width: 240px; margin-top: 16px; line-height: 1.7; text-align: center; }
.confirm .editor-actions { margin-top: 20px; }

/* 잠금이 켜진 기기가 화면을 떠났다 돌아올 때 — 서버 답이 오기 전까지 내용을 감춘다(FR-070, app.js) */
.is-veiled > * { visibility: hidden; }
