/* 해피비앨범 — 밝은 미색 바탕, 꿀빛 하나. 조부모가 보므로 글자는 크게, 누르는 곳은 넓게 */
:root {
  --bg: #fbf7ef;
  --card: #ffffff;
  --ink: #2b2620;
  --soft: #7a7064;
  --line: #ebe3d4;
  --honey: #e9a825;
  --honey-ink: #6b4a05;
  --honey-pale: #fdf1d6;
  --err: #b4442f;
  font-size: 17px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Gowun Dodum', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.top { padding: 22px 0 8px; }
.brand { margin: 0; color: var(--honey-ink); font-size: .82rem; letter-spacing: .04em; }
.top h1 { margin: 2px 0 0; font-size: 1.55rem; line-height: 1.3; font-weight: 400; }
.top h1:empty { display: none; }
.sub { margin: 0; color: var(--soft); }
.sub:empty { display: none; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 18px;
  margin-top: 14px;
}
.card h2 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 400; }
.card p { margin: 0 0 12px; color: var(--soft); }
.center { text-align: center; }

.field-label { display: block; margin: 16px 0 6px; color: var(--ink) !important; }
.field {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.field:focus { outline: 2px solid var(--honey); outline-offset: -1px; }

.go, .ghost {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.go { background: var(--honey); color: #fff; border-color: var(--honey); }
.go:disabled { opacity: .45; cursor: default; }
.ghost { background: transparent; border-color: var(--line); }
.wide { width: 100%; margin-top: 18px; }
.link { background: none; border: 0; color: var(--soft); text-decoration: underline; padding: 8px 0; }
.err { color: var(--err) !important; margin: 10px 0 0 !important; }
.cap { color: var(--soft); font-size: .88rem; margin: 6px 0; }

/* 홈 */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
.members { color: var(--soft); }
.bar .ghost { min-height: 42px; }
.upload {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  border: 1.5px dashed var(--honey);
  border-radius: 14px;
  background: var(--honey-pale);
  color: var(--honey-ink);
  font-size: 1.05rem;
  cursor: pointer;
}
.day h3 { margin: 22px 0 8px; font-size: 1rem; font-weight: 400; color: var(--soft); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.thumb { position: relative; padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute; right: 5px; bottom: 5px;
  background: rgba(255, 255, 255, .9); color: var(--honey-ink);
  border-radius: 999px; padding: 0 7px; font-size: .75rem;
}
.empty { text-align: center; color: var(--soft); margin: 48px 0; }

/* 크게 보기 */
.viewer {
  position: fixed; inset: 0; z-index: 20;
  background: #14110d;
  display: flex; flex-direction: column;
}
.viewer img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.close {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.1rem;
}
.viewer-foot { background: var(--bg); padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
.viewer-meta { margin: 0 0 10px; color: var(--soft); }
.reacts { display: flex; flex-wrap: wrap; gap: 8px; }
.reacts .cap { width: 100%; }
.react {
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.react.on { background: var(--honey-pale); border-color: var(--honey); color: var(--honey-ink); }

/* 초대받기 */
.peek { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 12px 0; }
.peek:empty { display: none; }
.peek img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.choices { display: grid; gap: 8px; }
.choices button {
  min-height: 50px; text-align: left; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.choices button.on { border-color: var(--honey); background: var(--honey-pale); color: var(--honey-ink); }

/* 가족 부르기 */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(20, 17, 13, .45); display: flex; align-items: flex-end; }
.sheet-inner {
  width: 100%; max-width: 640px; margin: 0 auto;
  background: var(--bg); border-radius: 18px 18px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
}
.sheet h3 { margin: 0 0 6px; font-weight: 400; font-size: 1.2rem; }
.sheet p { color: var(--soft); margin: 0 0 12px; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions > * { flex: 1; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 40;
  max-width: calc(100% - 32px);
}
