:root {
  --bg: #0b0b0b;
  --bg-spot: #2c2c2c;
  --card: #f3f3f5;
  --pill: #ffffff;
  --ink: #111111;
  --muted: #8b8b90;
  --line: #ececef;
  --accent: #c7c7f0;
  --focus: #111111;
  --danger: #c23b3b;
  --ok: #1f8a4c;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius-card: 28px;
  --radius-pill: 22px;
  --tap: 48px;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 42% at 50% -8%, var(--bg-spot) 0%, var(--bg) 58%);
  background-color: var(--bg);
  min-height: 100dvh;
  padding: 12px 10px calc(18px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.page {
  width: min(100%, 720px);
  margin: 0 auto;
}

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 22px 14px 16px;
  min-height: calc(100dvh - 24px);
}

.badge-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px 6px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f6f74;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
}

.badge-dot.off { background: #d0d0d4; }

.title {
  margin: 0 0 8px;
  text-align: center;
  font-size: clamp(1.7rem, 7vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 650;
}

.intro {
  margin: 0 auto 22px;
  max-width: 28rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  background: var(--pill);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.item.is-open {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199, 199, 240, 0.25);
}

.item-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 12px 12px 12px 14px;
  text-align: left;
}

.item-num {
  flex: 0 0 auto;
  width: 1.15rem;
  color: #b0b0b5;
  font-size: 0.78rem;
  font-weight: 500;
}

.item-title {
  flex: 1 1 auto;
  font-size: 0.98rem;
  font-weight: 560;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.item-toggle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.item.is-open .item-toggle {
  background: #ececef;
  color: #222;
}

.item-body {
  display: none;
  padding: 0 16px 16px 40px;
}

.item.is-open .item-body {
  display: block;
}

.hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.field,
.area {
  width: 100%;
  border: 0;
  background: #f7f7f9;
  border-radius: 16px;
  padding: 14px 14px;
  font-size: 16px;
  line-height: 1.45;
  outline: none;
  box-shadow: inset 0 0 0 1px #ececef;
}

.field:focus,
.area:focus {
  box-shadow: inset 0 0 0 1.5px #111;
  background: #fff;
}

.area {
  min-height: 140px;
  resize: vertical;
}

.photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #ececef;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.82);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 112px;
  border-radius: 16px;
  background: #f7f7f9;
  box-shadow: inset 0 0 0 1px #e4e4e8;
  color: var(--muted);
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
}

.upload strong {
  color: var(--ink);
  font-weight: 600;
}

.upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.footer {
  margin-top: 22px;
  text-align: center;
  color: #9a9aa0;
  font-size: 0.82rem;
}

.save-bar {
  position: sticky;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  font-size: 0.86rem;
  color: var(--muted);
}

.save-bar[data-state="saving"] { color: var(--ink); }
.save-bar[data-state="saved"] { color: var(--ok); }
.save-bar[data-state="error"] { color: var(--danger); }

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

@media (min-width: 720px) {
  body { padding: 36px 20px 40px; }
  .card {
    min-height: auto;
    border-radius: 44px;
    padding: 44px 42px 28px;
  }
  .item-body { padding-left: 44px; padding-right: 20px; }
  .photos { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 380px) {
  .item-title { font-size: 0.92rem; }
  .item-body { padding-left: 16px; }
}
