:root {
  --ink: #0a0a0a;
  --ink2: #3a3a3a;
  --ink3: #888;
  --paper: #faf9f7;
  --paper2: #f2f0ec;
  --paper3: #e8e5e0;
  --accent: #1a6bff;
  --accent-dim: rgba(26, 107, 255, 0.08);
  --accent-mid: rgba(26, 107, 255, 0.15);
  --red: #e8341a;
  --border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --r: 10px;
  --r-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Geist', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  background: rgba(250, 249, 247, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Geist Mono', monospace;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-auth { display: inline-flex; align-items: center; gap: 6px; }
.nav-auth:not(.nav-auth-ready) { opacity: 0; pointer-events: none; }
.nav-auth.nav-auth-ready { opacity: 1; pointer-events: auto; }
.nav-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--paper2); color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:disabled,
.btn-primary[disabled] {
  background: var(--paper3);
  color: var(--ink3);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-primary:disabled:hover,
.btn-primary[disabled]:hover {
  background: var(--paper3);
  color: var(--ink3);
  transform: none;
}
.btn-secondary { background: transparent; color: var(--ink2); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--paper2); color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0f5fe8; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26, 107, 255, 0.3); }
.btn-lg { font-size: 15px; padding: 12px 24px; border-radius: var(--r); }

.hero {
  padding: 140px 40px 80px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 5px 10px;
  background: var(--accent-dim);
  border-radius: 100px;
  border: 1px solid var(--accent-mid);
}
.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 62px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-desc {
  font-size: 18px;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 420px;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--ink3); margin-top: 16px; }
.hero-note a { color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }

.drop-zone-wrap { position: relative; }
.drop-zone {
  border: 1.5px dashed var(--paper3);
  border-radius: 16px;
  background: #fff;
  padding: 48px 36px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.drop-zone:hover,
.drop-zone.over {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim), var(--shadow-lg);
  transform: scale(1.01);
}
.drop-zone:hover::before,
.drop-zone.over::before { opacity: 1; }
.drop-zone.over { border-style: solid; }
.drop-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--paper2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}
.drop-zone:hover .drop-icon,
.drop-zone.over .drop-icon {
  transform: translateY(-4px) scale(1.1);
  background: var(--accent-dim);
}
.drop-zone-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.drop-zone-sub { font-size: 14px; color: var(--ink3); position: relative; z-index: 1; }
.drop-zone-sub strong { color: var(--accent); font-weight: 500; }
.drop-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--ink3);
  position: relative;
  z-index: 1;
}
.drop-divider::before,
.drop-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-upload {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  z-index: 1;
}
.btn-upload:hover { background: #0f5fe8; transform: translateY(-1px); }
.drop-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink3);
  position: relative;
  z-index: 1;
}
.drop-badge::before { content: '🔒'; font-size: 11px; }

.features { padding: 80px 40px; background: var(--ink); color: #fff; }
.features-inner { max-width: 1100px; margin: 0 auto; }
.features-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
}
.features-title {
  font-family: 'Instrument Serif', serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
  color: #fff;
}
.features-title em { font-style: italic; color: #7ba8ff; }
.features-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.45);
  max-width: 280px;
  text-align: right;
  line-height: 1.5;
}
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.feature-card { background: #141414; padding: 32px 28px; transition: background 0.2s; }
.feature-card:hover { background: #1a1a1a; }
.feature-card:first-child { border-radius: 12px 0 0 12px; }
.feature-card:last-child { border-radius: 0 12px 12px 0; }
.feat-num {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 20px;
  letter-spacing: 0.06em;
}
.feat-icon { font-size: 28px; margin-bottom: 16px; display: block; }
.feat-name { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.feat-desc { font-size: 14px; color: rgba(255, 255, 255, 0.5); line-height: 1.65; }

/* 이용 방법: 2단계 */
.how {
  padding: 80px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.how .section-label {
  display: block;
  text-align: center;
  margin-bottom: 12px;
}
.how .section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
}
.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}
.section-title em { font-style: italic; color: var(--accent); }

.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.step:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--paper3);
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: 20px;
}
.step .step-num {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.step-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.step-desc {
  font-size: 14px;
  color: var(--ink3);
  line-height: 1.65;
}

.guest-strip {
  margin: 0 auto 80px;
  max-width: 1020px;
  padding: 20px 24px;
  background: #fffbf0;
  border: 1px solid #f0e0a0;
  border-radius: var(--r);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.gs-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.gs-title { font-size: 14px; font-weight: 600; color: #7a5a00; margin-bottom: 3px; }
.gs-desc { font-size: 13px; color: #9a7a20; line-height: 1.55; }
.gs-desc a { color: #7a5a00; font-weight: 500; }

.cta-bottom {
  padding: 80px 40px;
  background: var(--paper2);
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-bottom h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
}
.cta-bottom h2 em { font-style: italic; color: var(--accent); }
.cta-bottom p { font-size: 16px; color: var(--ink2); margin-bottom: 32px; }
.cta-bottom-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }

footer {
  padding: 32px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink3);
}
.footer-logo {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
}
.footer-logo span { color: var(--accent); }

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 18px; font-weight: 600; color: var(--ink); }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--paper2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink2);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--paper3); }
.modal-body { padding: 20px 24px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.url-copy-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-top: 12px;
}
.url-copy-text {
  flex: 1;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-copy {
  flex-shrink: 0;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Geist', sans-serif;
}
.btn-copy:hover { background: var(--ink2); }
.btn-copy.copied { background: #22c55e; }
.success-icon {
  width: 56px;
  height: 56px;
  background: #e8f5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}

.modal-body .copy-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: 8px;
}
.modal-body .copy-label + .url-copy-box { margin-top: 0; }
.modal-body .copy-label-spaced { margin-top: 16px; }
.modal-body .guest-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--paper2);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink2);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.modal-body .guest-note a { color: var(--accent); font-weight: 500; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0; }

/* Form (settings modal) */
.modal-body .form-group { margin-bottom: 18px; }
.modal-body .form-group:last-of-type { margin-bottom: 0; }
.modal-body .form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: 8px;
}
.modal-body .form-input,
.modal-body .form-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: 'Geist', -apple-system, sans-serif;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--paper3);
  border-radius: var(--r-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.modal-body .form-input:focus,
.modal-body .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.modal-body .form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.modal-body .form-input[type="date"] {
  cursor: pointer;
  min-height: 42px;
}
.modal-body .form-date-with-clear {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.modal-body .form-date-with-clear .form-input-date {
  flex: 1;
  min-width: 0;
}
.modal-body .btn-date-clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--paper3);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink3);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.modal-body .btn-date-clear:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.modal-body .btn-date-clear:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.modal-body .form-hint { font-size: 12px; color: var(--ink3); margin-top: 6px; }

/* Switch (비밀문서) */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.switch-label { font-size: 14px; font-weight: 500; color: var(--ink); }
.switch-wrap {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}
.switch-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--paper3);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s;
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
  pointer-events: none;
}
.switch-input:checked + .switch-track {
  background: var(--accent);
}
.switch-input:checked + .switch-track .switch-thumb {
  transform: translateX(20px);
}
.switch-input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.upload-settings-password { margin-top: 14px; }
.upload-settings-password.is-hidden { display: none; }
.upload-share-period-row { margin-top: 28px; }
.modal-footer .btn-block { width: 100%; justify-content: center; }

/* 약관 동의 행 */
.terms-agree-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.terms-agree-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink2);
  flex: 1;
  min-width: 0;
}
.terms-agree-checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.terms-agree-text { font-weight: 500; color: var(--ink); }
.terms-view-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.terms-view-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* 약관 보기 모달 */
.modal-terms .modal-body.terms-body { padding: 20px 24px; max-height: 60vh; overflow-y: auto; }
.terms-content { font-size: 14px; line-height: 1.75; color: var(--ink2); }
.terms-content p { margin-bottom: 14px; }
.terms-content p:last-child { margin-bottom: 0; }
.terms-content strong { color: var(--ink); }
@media (max-width: 480px) {
  .terms-agree-row { flex-wrap: wrap; margin-top: 16px; padding-top: 14px; }
  .terms-view-btn { width: 100%; }
}

/* Upload success (simplified) */
.upload-success-body {
  text-align: center;
  padding: 8px 32px 20px;
}
.upload-success-body .success-icon { margin-bottom: 12px; }
.upload-success-body .copy-label { text-align: left; margin-top: 16px; }
.upload-success-body .copy-label:first-of-type { margin-top: 0; }
.upload-success-body .modal-footer { justify-content: center; }

.upload-success-body .copy-label + .url-copy-box {
  margin-top: 6px;
  max-width: 100%;
}
.upload-success-body .url-copy-box {
  margin-left: auto;
  margin-right: auto;
  max-width: 28em;
}
.upload-success-body .url-copy-text {
  min-width: 0;
  word-break: break-all;
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.12s; }
.fade-in:nth-child(3) { animation-delay: 0.19s; }
.fade-in:nth-child(4) { animation-delay: 0.26s; }
.fade-in:nth-child(5) { animation-delay: 0.33s; }
.fade-in:nth-child(6) { animation-delay: 0.4s; }
.fade-in:nth-child(7) { animation-delay: 0.47s; }
.fade-in:nth-child(8) { animation-delay: 0.54s; }

@media (max-width: 860px) {
  nav { padding: 0 20px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 120px 20px 60px;
  }
  .hero h1 { font-size: 44px; }
  .hero-desc { font-size: 16px; }
  .features { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; gap: 2px; }
  .feature-card:first-child { border-radius: 12px 12px 0 0; }
  .feature-card:last-child { border-radius: 0 0 12px 12px; }
  .how { padding: 60px 20px; }
  .how .section-title { margin-bottom: 36px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .step { padding: 28px 24px; }
  .section-title { font-size: 32px; }
  .features-title { font-size: 32px; }
  .features-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .features-sub { text-align: left; }
  footer { flex-direction: column; gap: 8px; text-align: center; }
}
