@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,700&display=swap");

:root {
  --ink: #2a241c;
  --muted: #6b5e4e;
  --paper: #f7f1e8;
  --card: #fffdf8;
  --line: #e6dccb;
  --boston: #c45c26;
  --seoul: #1f6b5a;
  --accent: #8b3d2b;
  --shadow: 0 18px 50px rgba(61, 42, 24, 0.1);
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; }

body.family-body {
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
}

.family-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at -10% -20%, rgba(196, 92, 38, 0.22), transparent 55%),
    radial-gradient(800px 480px at 110% 0%, rgba(31, 107, 90, 0.2), transparent 50%),
    linear-gradient(180deg, #f3e6d4 0%, var(--paper) 38%, #efe6d8 100%);
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.25rem 1.1rem 3.5rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--boston), #8b3d2b 55%, var(--seoul));
  display: grid;
  place-items: center;
  color: #fff;
  font-family: Fraunces, serif;
  font-size: 1.15rem;
  box-shadow: var(--shadow);
}

.brand h1 {
  font-family: Fraunces, "Noto Sans KR", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand p { font-size: 0.82rem; color: var(--muted); }

.lang {
  display: flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem;
}

.lang button {
  border: 0;
  background: transparent;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}

.lang button.on {
  background: var(--ink);
  color: #fff;
}

html[lang="en"] .t-ko { display: none; }
html[lang="ko"] .t-en { display: none; }

.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.35rem 1.2rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.1rem;
}

.intro {
  margin: 0 0 1.1rem;
  border-radius: 20px;
  overflow: hidden;
  background: #efe6d8;
  min-height: 220px;
  position: relative;
}

.intro img {
  display: none;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center top;
}

.intro-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-weight: 600;
}

.hero-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--boston);
  font-weight: 700;
}

.hero h2 {
  font-family: Fraunces, serif;
  font-size: 1.7rem;
  margin: 0.25rem 0 0.4rem;
}

.hero-lead { color: var(--muted); font-size: 0.95rem; }

.clocks {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.6rem;
  align-items: stretch;
  margin-top: 1.15rem;
}

.city {
  border-radius: 20px;
  padding: 1rem 0.9rem 1.1rem;
  min-height: 150px;
}

.city.boston {
  background: linear-gradient(180deg, #fff7f0, #fde6d4);
  border: 1px solid #f0c8aa;
}

.city.seoul {
  background: linear-gradient(180deg, #f3faf6, #dceee6);
  border: 1px solid #b7d7cc;
}

.city .who { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.city .name { font-size: 1.05rem; font-weight: 700; margin: 0.15rem 0 0.55rem; }
.city .time {
  font-family: Fraunces, serif;
  font-size: 1.85rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.city .date { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }

.bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 64px;
}

.bridge span.hrs {
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
}

.quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.1rem 0;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: 0 10px 28px rgba(61, 42, 24, 0.06);
}

.panel h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.hint { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.85rem; }

.note {
  background: #f8f3ea;
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  margin-top: 0.5rem;
  font-size: 0.92rem;
}

.note strong { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.15rem; }

.drop {
  border: 2px dashed #d2c4ae;
  border-radius: 18px;
  padding: 1.4rem 1rem;
  text-align: center;
  background: #fbf7f0;
  cursor: pointer;
}

.drop.drag-over {
  border-color: var(--seoul);
  background: #eef7f3;
}

.drop .big { font-size: 1.05rem; font-weight: 600; }
.drop .small { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; }
.pick { color: var(--seoul); text-decoration: underline; cursor: pointer; font-weight: 700; }

.previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.6rem;
  margin: 0.85rem 0 0;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #efe6d8;
  border: 1px solid var(--line);
}

.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.file-icon { font-size: 2rem; display: grid; place-items: center; height: 100%; }
.file-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(42, 36, 28, 0.7);
  color: #fff;
  font-size: 0.62rem;
  padding: 3px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.remove-btn {
  position: absolute;
  top: 5px; right: 5px;
  width: 24px; height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  margin-top: 0.55rem;
}

.status { margin-top: 0.7rem; font-size: 0.88rem; color: var(--muted); }
.err { color: #b42318; font-size: 0.9rem; margin-top: 0.6rem; }

.files { display: flex; flex-direction: column; gap: 0.5rem; }
.file-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  background: #f8f3ea;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
}
.file-row strong { font-size: 0.92rem; word-break: break-all; }
.file-row span { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

.safety {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.chip {
  background: #f8f3ea;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.login-card { max-width: 440px; margin: 2rem auto; }

.whoami {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.15rem 0 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.7rem 0;
}

.field span { font-size: 0.88rem; color: var(--muted); }

input[type="password"],
input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  font: inherit;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
}

textarea { min-height: 7rem; resize: vertical; }

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.cal-head h3 { margin: 0; }

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

.day-slider {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.45rem;
  scroll-snap-type: x mandatory;
}

.day-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font: inherit;
}

.day-chip.has { border-color: var(--boston); font-weight: 700; }
.day-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.latest {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
}

.latest .shot {
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

.latest img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.latest .shot span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(42, 36, 28, 0.72);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.post {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  margin: 0.85rem 0;
}

.post.daughter { border-left: 4px solid var(--boston); }
.post.parents { border-left: 4px solid var(--seoul); }

.post-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.45rem; }
.post p { white-space: pre-wrap; }
.post-imgs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.post-imgs img { width: 160px; height: 160px; object-fit: cover; border-radius: 10px; }

.text-btn {
  background: none;
  border: 0;
  color: var(--boston);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.err { color: #a33; margin-top: 0.6rem; }

.foot {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .clocks { grid-template-columns: 1fr; }
  .bridge { flex-direction: row; min-height: auto; padding: 0.2rem 0; }
  .quick { grid-template-columns: 1fr; }
  .city .time { font-size: 2.05rem; }
  .hero h2 { font-size: 1.45rem; }
}
