:root {
  --bg: #f3f5fb;
  --card-bg: #ffffff;
  --row-bg: #fafbff;
  --row-border: #eef0f7;
  --text: #0f1222;
  --muted: #6b7280;
  --accent: #ff2e7e;
  --accent-soft: #ffe4ef;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 14px 36px rgba(16, 24, 40, 0.1);
  --radius-card: 20px;
  --radius-row: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 24px 12px 56px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding-bottom: 20px;
}

.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f6d6e4 0%, #d8c7f5 100%);
  overflow: hidden;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar {
  position: relative;
  z-index: 2;
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  margin: -62px auto 0;
  background: #eee;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.promo {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
  margin: 10px 24px 6px;
  letter-spacing: -0.01em;
}

.subpromo {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin: 0 24px 18px;
}

.products {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}

.product-row {
  all: unset;
  cursor: pointer;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--row-bg);
  border: 1px solid var(--row-border);
  border-radius: var(--radius-row);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.product-row:hover,
.product-row:focus-visible {
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
  outline: none;
}

.product-row:active {
  transform: translateY(0);
}

.product-row .thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #e9ebf3;
}

.product-row .meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.product-row .title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.product-row .desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-row .price {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding-left: 4px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  margin: 12px 16px 0;
  padding: 10px 12px;
  background: #fff1f3;
  color: #b42318;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  font-size: 13px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.pf-logo {
  display: block;
  width: 118px;
  height: auto;
}

.pf-logo-square {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 18, 34, 0.12);
}

.page-brand {
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
  text-decoration: none;
}

/* ---------- gallery.html / success.html ---------- */

.page {
  max-width: 440px;
  margin: 0 auto;
}

.page-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  text-align: center;
}

.page-sub {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin: 0 0 20px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  all: unset;
  cursor: pointer;
  text-align: center;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  font-size: 15px;
  transition: transform 0.1s ease, opacity 0.1s ease, box-shadow 0.15s ease;
}

.btn:hover {
  box-shadow: 0 8px 20px rgba(255, 46, 126, 0.35);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  box-shadow: none;
}

.password-reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #f7f8fd;
  border: 1px dashed #d0d5dd;
  border-radius: 12px;
  margin: 14px 0;
}

.password-reveal code {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.warning {
  background: #fff7ed;
  color: #7c2d12;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin: 12px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.gallery-item {
  position: relative;
  background: #eef0f7;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.gallery-item .download-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.gallery-item .download-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.gallery-item .video-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.back-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}
