@import url('./tokens-dark.css');

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #0d0d0f;
}

/* Phone-screen base */
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--paper-0);
  font-family: var(--font-sans);
  color: var(--fg-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen-scroll::-webkit-scrollbar { width: 0; height: 0; }

/* App header (mobile) */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  background: var(--paper-0);
  border-bottom: 1px solid var(--border-subtle);
}

.app-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.app-logo .logo-mark {
  color: var(--accent);
  font-family: var(--font-han);
  font-size: 22px;
  line-height: 1;
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--paper-1);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--fg-secondary);
}

.icon-btn:hover { background: var(--paper-2); }

/* Bottom CTA bar (sticky on phone) */
.bottom-bar {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(13, 13, 15, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--accent);
  color: var(--fg-on-gold);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(0.5px); }

.btn-primary.btn-block {
  width: 100%; padding: 16px 20px; font-size: 16px;
}

.btn-secondary {
  background: var(--paper-2);
  color: var(--ink-900);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--paper-3); }

.btn-ghost {
  background: transparent; color: var(--fg-secondary);
}
.btn-ghost:hover { color: var(--accent-deep); }

.btn-pill {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
}

/* Card */
.card {
  background: var(--paper-1);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px;
}
.card-flat {
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
}

/* Eyebrow & rules */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent-deep);
  text-transform: uppercase;
}

.gold-rule {
  height: 1px;
  background: var(--gradient-rule);
  margin: 12px 0;
}

/* Subtle decorative corner ornament */
.corner-ornament {
  position: absolute;
  width: 56px;
  height: 56px;
  pointer-events: none;
  opacity: 0.5;
}
.corner-ornament svg { width: 100%; height: 100%; }

/* Inputs */
.input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--paper-1);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg-primary);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 207, 160, 0.18);
}
.input::placeholder { color: var(--fg-muted); }

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.label .req { color: var(--sangju-500); font-size: 11px; }

/* Section heading */
.section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0 0 4px;
}
.section-sub {
  font-size: 13px;
  color: var(--fg-tertiary);
  line-height: 1.55;
}

/* Han glyph display */
.han {
  font-family: var(--font-han);
  color: var(--ink-900);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s var(--ease-out) both; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Utility */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.muted { color: var(--fg-tertiary); }
.center { text-align: center; }

/* Tabs / chip filter */
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--paper-1);
  font-size: 13px;
  color: var(--fg-secondary);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s;
}
.chip.active {
  background: var(--gold-100);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Funeral notice card (template preview) */
.notice-card {
  background: var(--chrysanthemum);
  border-radius: 14px;
  padding: 28px 22px;
  position: relative;
  border: 1px solid var(--paper-3);
  aspect-ratio: 9/16;
  overflow: hidden;
  color: #1f1813;
}
.notice-card.dark {
  background: #15151a;
  color: var(--paper-0);
  border-color: #2a2a32;
}
