/* DreamShot Wedding — fresh HTML/CSS (images ref: kimi.page) */

:root {
  --bg: #f7f1ea;
  --bg-2: #fffaf4;
  --text: #211a17;
  --muted: #75685f;
  --gold: #b89166;
  --gold-hover: #caa87d;
  --border: rgba(39, 32, 28, 0.13);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Plus Jakarta Sans", "Noto Sans KR", system-ui, sans-serif;
  --wrap: 1120px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(184, 145, 102, 0.16), transparent 32rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  cursor: default;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]),
textarea {
  cursor: text;
}

html.i18n-pending body {
  opacity: 0;
}

html.i18n-ready body {
  opacity: 1;
  transition: opacity 0.12s ease;
}

html.site-access-locked body > :not(.site-access-gate) {
  visibility: hidden;
  pointer-events: none;
}

.site-access-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 22% 18%, rgba(184, 145, 102, 0.2), transparent 28rem),
    linear-gradient(180deg, rgba(247, 241, 234, 0.98), rgba(239, 229, 218, 0.96));
}

.site-access-panel {
  width: min(420px, 100%);
  padding: 2rem;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 28px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 28px 90px rgba(65, 46, 33, 0.16);
}

.site-access-panel h1 {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.site-access-panel p:not(.section-label) {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.site-access-panel label {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  color: #7a5a38;
  font-size: 0.8rem;
  font-weight: 800;
}

.site-access-panel input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(184, 145, 102, 0.32);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.95);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
}

.site-access-panel input:focus {
  outline: 2px solid rgba(184, 145, 102, 0.35);
  outline-offset: 2px;
}

.site-access-error {
  color: #9b3f33 !important;
  font-size: 0.82rem;
  font-weight: 800;
}

.site-access-panel .btn {
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.wrap.narrow { max-width: 640px; text-align: center; }

.admin-page {
  min-height: 100vh;
  background: #f4eee7;
}

.admin-shell {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.admin-panel,
.admin-stat {
  border: 1px solid rgba(39, 32, 28, 0.12);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.92);
  box-shadow: 0 18px 48px rgba(65, 46, 33, 0.08);
}

.admin-hero {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: end;
  padding: 1.5rem;
}

.admin-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
}

.admin-hero p:not(.section-label),
.admin-muted,
.admin-list small {
  color: var(--muted);
}

.admin-key-form,
.admin-search,
.admin-credit-form,
.admin-reset-form {
  display: flex;
  gap: 0.6rem;
  align-items: end;
}

.admin-reset-form {
  flex-wrap: wrap;
}

.admin-reset-form label {
  display: grid;
  gap: 0.35rem;
  color: #7a5a38;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-reset-form label span {
  font-size: 0.78rem;
}

.admin-reset-form input[type="text"] {
  min-width: 180px;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
}

.admin-reset-check {
  display: inline-flex !important;
  gap: 0.45rem;
  align-items: center;
  padding-bottom: 0.15rem;
  font-weight: 600;
}

.admin-key-form {
  min-width: min(460px, 100%);
}

.admin-key-form label {
  display: grid;
  flex: 1;
  gap: 0.35rem;
  color: #7a5a38;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-key-form input,
.admin-search input,
.admin-credit-form input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.admin-stat {
  padding: 1rem 1.2rem;
}

.admin-stat span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-stat strong {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-panel {
  padding: 1.2rem;
}

.admin-section-head {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-section-head h2 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 0.72rem 0.55rem;
  border-bottom: 1px solid rgba(39, 32, 28, 0.09);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #7a5a38;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.admin-table button,
.admin-search button,
.admin-credit-form button,
.admin-section-head button {
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 999px;
  background: #fff7ed;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.admin-danger {
  border-color: rgba(154, 63, 51, 0.35) !important;
  background: #fff0ed !important;
  color: #9b3f33 !important;
}

.admin-error {
  color: #9b3f33;
  font-weight: 800;
}

.admin-credit-box {
  display: inline-flex;
  gap: 0.5rem;
  align-items: baseline;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  background: rgba(184, 145, 102, 0.12);
}

.admin-credit-box strong {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
}

.admin-list {
  display: grid;
  gap: 0.4rem;
  margin: 0.6rem 0 1rem;
}

.admin-list li {
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.admin-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 0.7rem 0 1.1rem;
}

.admin-result-card {
  overflow: hidden;
  border: 1px solid rgba(39, 32, 28, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.admin-result-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.admin-result-card div {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem;
}

.admin-result-card strong {
  font-size: 0.82rem;
}

.admin-result-card small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.admin-result-card a:last-child {
  color: #8a633c;
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-status {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(184, 145, 102, 0.14);
  font-size: 0.74rem;
  font-weight: 800;
}

.admin-status-failed {
  background: #fff0ed;
  color: #9b3f33;
}

.admin-status-completed {
  background: #eef8ed;
  color: #3b7739;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr min(var(--wrap), 100%) 1fr;
  align-items: center;
  padding: 0;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(39, 32, 28, 0.12);
  box-shadow: 0 10px 30px rgba(20, 15, 12, 0.08);
}

.site-header-bar {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 1.5rem;
  position: relative;
}

.brand {
  position: absolute;
  right: calc(100% + 1rem);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: #211a17;
  flex-shrink: 0;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  flex-shrink: 1;
  min-width: 0;
}

.site-nav a {
  font-size: 0.875rem;
  color: #5f5650;
  transition: color 0.2s;
}

.site-nav a:hover { color: #1c1714; }

.site-nav a.is-current {
  color: #1c1714;
  font-weight: 800;
}

.site-nav a.is-current::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--gold);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
  padding: 0.2rem;
  border: 1px solid rgba(39, 32, 28, 0.12);
  border-radius: 999px;
  background: rgba(33, 26, 23, 0.06);
}

.language-switcher button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5f5650;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.language-switcher button.active,
.language-switcher button:hover {
  background: #211a17;
  color: #fffaf4;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.header-auth a,
.header-auth button {
  border: 0;
  background: transparent;
  color: #5f5650;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.header-auth .header-login {
  padding: 0.55rem 0.2rem;
}

.header-auth .header-user-link {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1c1714;
}

.header-auth .header-logout {
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(33, 26, 23, 0.16);
  border-radius: 999px;
  color: #7a5a38;
}

.header-auth .header-logout:hover,
.header-auth .header-login:hover,
.header-auth .header-user-link:hover {
  color: #1c1714;
}

.header-generation-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  margin-right: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(184, 134, 11, 0.35);
  background: rgba(184, 134, 11, 0.12);
  color: #6b4f0d;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-generation-status:hover {
  background: rgba(184, 134, 11, 0.18);
  border-color: rgba(184, 134, 11, 0.55);
  color: #4a3608;
}

.header-generation-status[hidden] {
  display: none !important;
}

.header-generation-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.45);
  animation: header-generation-pulse 1.6s ease-in-out infinite;
}

@keyframes header-generation-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(184, 134, 11, 0); }
}

.generation-complete-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(20, 15, 12, 0.55);
  backdrop-filter: blur(4px);
}

.generation-complete-dialog {
  width: min(100%, 28rem);
  padding: 1.75rem;
  border-radius: 1rem;
  background: #faf8f5;
  border: 1px solid rgba(39, 32, 28, 0.12);
  box-shadow: 0 24px 60px rgba(20, 15, 12, 0.22);
}

.generation-complete-dialog h3 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: #211a17;
}

.generation-complete-dialog p {
  margin: 0 0 1.25rem;
  color: #5f5650;
  line-height: 1.6;
}

.generation-complete-dialog.is-failed h3 {
  color: #8b2f2f;
}

.generation-complete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.app-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(20, 15, 12, 0.48);
  backdrop-filter: blur(6px);
}

.app-notice-dialog {
  width: min(100%, 26rem);
  padding: 2rem 1.75rem 1.6rem;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 24px;
  background: #fffaf4;
  box-shadow: 0 28px 80px rgba(20, 15, 12, 0.32);
  text-align: center;
}

.app-notice-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(184, 145, 102, 0.2), rgba(184, 145, 102, 0.08));
  color: #9a7d5f;
  font-size: 1.35rem;
}

.app-notice-dialog h3 {
  margin: 0 0 0.65rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 4vw, 1.75rem);
  font-weight: 400;
  color: #211a17;
  line-height: 1.25;
}

.app-notice-dialog p {
  margin: 0 0 1.35rem;
  color: #6f6258;
  font-size: 0.94rem;
  line-height: 1.65;
}

.app-notice-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.app-notice-actions .btn {
  width: 100%;
  min-height: 48px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #211a17;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold);
  color: #1a1510;
}
.btn-gold:hover { background: var(--gold-hover); }

.btn.is-processing {
  pointer-events: none;
  opacity: 0.62;
}

.btn-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.5rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spinner-rotate 0.75s linear infinite;
}

@keyframes btn-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.site-header .btn-gold {
  background: #211a17;
  color: #fffaf4;
}

.site-header .btn-gold:hover {
  background: #3a302a;
}

.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.site-header .btn-gold { flex-shrink: 0; }

.floating-top-link {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 120;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: rgba(10, 9, 8, 0.82);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.floating-top-link:hover {
  background: var(--gold);
  color: #1a120b;
  transform: translateY(-3px);
}

.floating-top-link-left {
  left: 1.5rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1.2s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(10, 8, 7, 0.16) 28%, rgba(10, 8, 7, 0.62) 100%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), rgba(10, 8, 7, 0.44) 68%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  width: 100%;
}

.eyebrow, .section-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3.6rem, 10vw, 6.4rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 1rem;
  color: #fffaf4;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.order-page {
  padding-top: var(--header-h);
}

.order-hero h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-desc {
  color: rgba(255, 250, 244, 0.86);
  max-width: 42rem;
  margin-bottom: 1.75rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
  font-weight: 600;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.hero .btn-gold {
  background: #fffaf4;
  color: #211a17;
}

.hero .btn-gold:hover {
  background: #eadfd4;
}

.hero .btn-outline {
  border-color: rgba(255, 250, 244, 0.65);
  color: #fffaf4;
}

.hero .btn-outline:hover {
  border-color: #fffaf4;
  color: #fffaf4;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1.15rem;
  margin-top: 1.7rem;
  font-size: clamp(0.9rem, 1.35vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fffaf4;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.82),
    0 10px 28px rgba(0, 0, 0, 0.58);
}

.trust li {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.trust li + li::before {
  content: "|";
  margin-right: 1.15rem;
  color: rgba(255, 250, 244, 0.48);
}

.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}

.hero-dots button {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}

.hero-dots button.active { background: #fffaf4; }

/* Sections */
.section {
  padding: 5rem 0;
}

.section-dark {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.86), rgba(239, 229, 218, 0.72)),
    var(--bg-2);
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 720px;
}

.section-dark .section-desc { color: var(--muted); }

.templates-page .order-hero {
  padding: 3rem 0 2.2rem;
}

.templates-page .order-hero h1 {
  margin-bottom: 0.75rem;
}

.templates-page .order-hero .section-desc {
  margin-bottom: 0;
}

.templates-page .section-dark {
  padding: 2.6rem 0 4rem;
}

.pricing-page .order-hero {
  padding: 3rem 0 2.2rem;
}

.pricing-page .order-hero h1 {
  margin-bottom: 0.75rem;
}

.pricing-page .order-hero .section-desc {
  margin-bottom: 0;
}

.pricing-page .section-dark {
  padding: 2.6rem 0 4rem;
}

.templates-page .template-catalog {
  gap: 1.45rem;
  padding: 0.5rem 0.25rem 1rem;
  margin: 0 -0.25rem;
}

.order-guide-page .order-hero {
  padding: 3rem 0 2.2rem;
}

.order-guide-page .order-hero h1 {
  margin-bottom: 0.75rem;
}

.order-guide-page .order-hero .section-desc {
  margin-bottom: 0;
}

.order-guide-page > .section-dark {
  padding: 2.6rem 0 3.6rem;
}

.order-guide-page .flow-grid {
  margin-top: 0.4rem;
}

#template-detail {
  padding-top: 2rem;
}

/* Order Flow */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.flow-card {
  min-height: 260px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(184, 145, 102, 0.15), transparent 46%),
    rgba(255, 250, 244, 0.92);
  box-shadow: 0 18px 48px rgba(65, 46, 33, 0.08);
}

.flow-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.flow-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.mypage-top {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  padding: 1.1rem 0 0.75rem;
  background:
    linear-gradient(180deg, rgba(247, 241, 234, 0.98), rgba(247, 241, 234, 0.92));
  border-bottom: 1px solid rgba(184, 145, 102, 0.14);
  backdrop-filter: blur(14px);
}

.mypage-title-row {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(184, 145, 102, 0.24);
}

.mypage-tabs {
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.32rem;
  border: 1px solid rgba(184, 145, 102, 0.42);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 16px 40px rgba(92, 64, 43, 0.14);
  pointer-events: auto;
}

.mypage-tabs a {
  min-width: 150px;
  padding: 0.78rem 1.28rem;
  border-radius: 999px;
  color: #7a6657;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  pointer-events: auto;
}

.mypage-tabs a:hover {
  color: #211a17;
}

.mypage-tabs a.is-active {
  background: var(--gold);
  color: #211a17;
  box-shadow: 0 12px 26px rgba(184, 145, 102, 0.34);
}

.mypage-title-row > div,
.mypage-title-row > .section-label,
.mypage-title-row > .section-desc {
  grid-column: 1;
}

.mypage-title-row > div {
  grid-row: 1 / span 2;
}

.mypage-title-row > .section-label {
  grid-row: 1;
}

.mypage-title-row h1 {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0.6rem 0 0;
}

.mypage-title-row .section-desc {
  display: none;
}

.credit-balance-card {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin: 0 0 0.1rem;
  color: #7a4f22;
  vertical-align: baseline;
  white-space: nowrap;
}

.credit-balance-card span {
  color: #7a5a38;
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: none;
}

.credit-balance-card strong {
  display: inline;
  margin: 0;
  color: #7a4f22;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 400;
  line-height: 1;
}

.order-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: center;
}

.progress-card {
  position: relative;
  display: block;
  height: 98px;
  min-height: 98px;
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(184, 145, 102, 0.22);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.92);
  box-shadow: 0 18px 48px rgba(65, 46, 33, 0.08);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.progress-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 145, 102, 0.52);
}

.progress-card h3 {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
}

.progress-card p {
  display: none;
}

.progress-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(184, 145, 102, 0.14);
  color: #7a5a38;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.progress-card .step-num {
  display: inline-block;
  font-size: 1.25rem;
  margin: 0 0.45rem 0 0;
  vertical-align: middle;
}

#photo-upload {
  padding-top: 2.5rem;
}

#photo-upload.is-upload-locked .upload-slot input[type="file"],
#photo-upload.is-upload-locked [data-height-input-cm],
#photo-upload.is-upload-locked [data-height-input-ft],
#photo-upload.is-upload-locked [data-hair-preference],
#photo-upload.is-upload-locked [data-generate-slim-body],
#photo-upload.is-upload-locked [data-generate-couple],
#photo-upload.is-upload-locked [data-complete-photos] {
  pointer-events: none;
  opacity: 0.55;
}

#photo-upload .wrap {
  max-width: 1040px;
}

#photo-upload .upload-group {
  padding: 1rem;
  border-radius: 18px;
}

#photo-upload .upload-group + .upload-group {
  margin-top: 1rem;
}

#photo-upload .upload-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 0.85rem;
}

#photo-upload .upload-heading-copy {
  flex: 1 1 auto;
  min-width: 0;
}

#photo-upload .upload-person-kicker {
  font-size: 1.55rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.5rem;
}

#photo-upload .upload-heading-actions {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex: 0 0 auto;
}

#photo-upload .ai-partner-button {
  position: relative;
  align-self: stretch;
  min-width: 9.4rem;
  padding: 0.95rem 1.25rem;
  border: 1px solid rgba(184, 145, 102, 0.5);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.8), transparent 34%),
    linear-gradient(135deg, #fff9ef 0%, #f2dcc1 48%, #c79b63 100%);
  color: #2b211b;
  box-shadow: 0 16px 34px rgba(92, 63, 35, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
}

#photo-upload .ai-partner-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.55) 46%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}

#photo-upload .ai-partner-button:hover {
  border-color: rgba(154, 111, 64, 0.72);
  color: #211a17;
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(92, 63, 35, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#photo-upload .ai-partner-button:hover::after {
  transform: translateX(120%);
}

#photo-upload .body-slim-controls.is-hidden-for-ai-partner {
  display: none !important;
}

#photo-upload .upload-slot.is-ai-partner-active {
  cursor: pointer;
}

#photo-upload .upload-slot.is-ai-partner-active input[type="file"] {
  pointer-events: none;
}

#photo-upload .upload-slot.is-control-busy {
  cursor: not-allowed;
}

#photo-upload .upload-slot.is-control-busy input[type="file"] {
  pointer-events: none;
}

#photo-upload .upload-slot.is-control-busy strong {
  opacity: 0.55;
  pointer-events: none;
}

#photo-upload .ai-partner-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.ai-partner-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(20, 15, 12, 0.55);
  backdrop-filter: blur(4px);
}

.ai-partner-dialog {
  position: relative;
  width: min(100%, 42rem);
  max-height: min(88vh, 44rem);
  overflow: auto;
  padding: 1.75rem;
  border-radius: 1rem;
  background: #faf8f5;
  border: 1px solid rgba(39, 32, 28, 0.12);
  box-shadow: 0 24px 60px rgba(20, 15, 12, 0.22);
}

.ai-partner-dialog h3 {
  margin: 0 0 0.5rem;
  padding-right: 2rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: #211a17;
}

.ai-partner-hint {
  margin: 0 0 1rem;
  color: #5f5650;
  line-height: 1.55;
}

.ai-partner-status {
  min-height: 1.25rem;
  margin: 0 0 0.75rem;
  color: #8b6914;
  font-size: 0.92rem;
}

.ai-partner-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(39, 32, 28, 0.08);
  color: #211a17;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ai-partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.85rem;
}

.ai-partner-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: #5f5650;
}

.ai-partner-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid rgba(39, 32, 28, 0.12);
  border-radius: 0.85rem;
  background: #fff;
  color: #211a17;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ai-partner-card:hover:not(:disabled) {
  border-color: rgba(184, 134, 11, 0.65);
  box-shadow: 0 12px 28px rgba(92, 63, 35, 0.14);
  transform: translateY(-1px);
}

.ai-partner-card.is-selected {
  border-color: rgba(184, 134, 11, 0.85);
  box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.25);
}

.ai-partner-card:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ai-partner-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.65rem;
  background: #efe8df;
}

.ai-partner-card span {
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

#photo-upload .upload-heading h3 {
  font-size: 1.45rem;
}

#photo-upload .upload-note,
#photo-upload .upload-heading span {
  font-size: 0.76rem;
}

#photo-upload .upload-note {
  max-width: none;
  white-space: nowrap;
}

#photo-upload .face-upload-group .upload-note {
  white-space: normal;
  max-width: 42rem;
}

#photo-upload .sample-row,
#photo-upload .upload-row {
  gap: 0.55rem;
}

#photo-upload .face-upload-group .sample-row,
#photo-upload .face-upload-group .upload-row {
  gap: 0.55rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: stretch;
  margin-inline: 0;
  max-width: none;
}

#photo-upload .face-upload-group .sample-row figure.body-sample,
#photo-upload .face-upload-group .upload-slot.body-upload-slot {
  aspect-ratio: 3 / 4;
  min-height: 0;
}

#photo-upload .face-upload-group .sample-row > figure:not(.body-sample),
#photo-upload .face-upload-group .upload-row > .upload-slot:not(.body-upload-slot) {
  aspect-ratio: 3 / 4;
  min-height: 0;
}

#photo-upload .face-upload-group .sample-row figure.body-sample img,
#photo-upload .face-upload-group .upload-slot.body-upload-slot img,
#photo-upload .face-upload-group .sample-row > figure:not(.body-sample) img,
#photo-upload .face-upload-group .upload-row > .upload-slot:not(.body-upload-slot) img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
}

#photo-upload .body-upload-column {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

#photo-upload .body-slim-controls {
  display: grid;
  gap: 0.5rem;
  padding: 0.15rem 0.1rem 0;
}

#photo-upload .body-slim-controls .couple-body-type-options {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

#photo-upload .body-slim-generate-button {
  width: 100%;
}

#photo-upload .body-slim-generate-button:disabled:not(.is-generated) {
  opacity: 0.55;
  cursor: not-allowed;
}

#photo-upload .body-slim-generate-button.is-generated,
#photo-upload .body-slim-generate-button.is-generated:disabled {
  background: #ebe3da;
  color: rgba(58, 48, 42, 0.48);
  border: 1px solid rgba(184, 145, 102, 0.22);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

#photo-upload .body-slim-generate-button.is-generated:hover,
#photo-upload .body-slim-generate-button.is-generated:disabled:hover {
  background: #ebe3da;
  color: rgba(58, 48, 42, 0.48);
}

#photo-upload .body-slim-controls:has(.body-slim-generate-button.is-generated) .body-slim-status:not([hidden]) {
  color: rgba(92, 111, 69, 0.82);
}

#photo-upload .body-slim-status {
  min-height: 1rem;
  color: #7a6555;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

#photo-upload .body-slim-status:not([hidden]) {
  display: block;
}

#photo-upload .body-slim-controls.is-loading .body-slim-generate-button,
#photo-upload .body-slim-controls.is-loading .couple-body-type-options {
  opacity: 0.55;
  pointer-events: none;
}

#photo-upload .body-slim-controls.is-slim-error .body-slim-status {
  color: #9b3f33;
}

#photo-upload .sample-row figure {
  min-height: 190px;
  margin-bottom: 0.7rem;
}

#photo-upload .face-upload-group .sample-row figure:not(.body-sample) {
  min-height: 0;
  margin-bottom: 0.7rem;
}

#photo-upload .face-upload-group .sample-row figure.body-sample {
  min-height: 0;
  margin-bottom: 0.7rem;
}

#photo-upload .sample-row img {
  min-height: 190px;
}

#photo-upload .face-upload-group .sample-row img {
  min-height: 0;
}

#photo-upload .upload-slot {
  min-height: 135px;
}

#photo-upload .face-upload-group .upload-slot:not(.body-upload-slot) {
  min-height: 0;
}

#photo-upload .face-upload-group .upload-slot.body-upload-slot {
  min-height: 0;
}

#photo-upload .upload-slot img {
  min-height: 135px;
}

#photo-upload .face-upload-group .upload-slot img {
  min-height: 0;
}

#photo-upload .sample-row figcaption,
#photo-upload .upload-slot span {
  left: 0.55rem;
  top: 0.55rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
}

#photo-upload .upload-slot::before {
  inset: 0.7rem;
}

#photo-upload .upload-slot strong {
  min-width: 92px;
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
}

#photo-upload .upload-feedback {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.55rem;
  z-index: 2;
  color: #5c6f45;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

#photo-upload .upload-slot.has-image:not(.has-upload-error) .upload-feedback {
  display: none;
}

#photo-upload .upload-slot.is-processing-clean-body {
  border-color: rgba(184, 145, 102, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 250, 244, 0.88), rgba(239, 229, 218, 0.92));
}

#photo-upload .upload-slot.is-processing-clean-body::before {
  content: "";
  width: 38px;
  height: 38px;
  inset: 0.9rem;
  left: 50%;
  top: 39%;
  bottom: auto;
  right: auto;
  display: block;
  border: 4px solid rgba(184, 145, 102, 0.28);
  border-top-color: var(--gold);
  border-radius: 999px;
  background: transparent;
  transform: translate(-50%, -50%);
  animation: body-clean-spinner 0.85s linear infinite;
}

#photo-upload .upload-slot.is-processing-clean-body img {
  opacity: 0;
}

#photo-upload .upload-slot.is-processing-clean-body span {
  left: 50%;
  top: calc(39% + 40px);
  width: min(82%, 190px);
  padding: 0;
  color: #6f5a45;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  background: transparent;
  transform: translateX(-50%);
}

#photo-upload .upload-slot.is-processing-clean-body span::before {
  content: "AI is cleaning\A full-body reference";
  white-space: pre-line;
}

#photo-upload .upload-slot.is-processing-clean-body span {
  font-size: 0;
}

#photo-upload .upload-slot.is-processing-clean-body strong {
  display: none;
}

#photo-upload .upload-slot.is-processing-clean-body .upload-feedback {
  display: block;
  color: #8c663f;
  bottom: 0.5rem;
  padding: 0 0.35rem;
  font-size: 0.62rem;
  line-height: 1.15;
}

#photo-upload .couple-generated-preview.has-image .upload-feedback {
  display: block;
}

@keyframes body-clean-spinner {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

#photo-upload .upload-slot.has-upload-error {
  border-color: rgba(178, 79, 61, 0.5);
}

#photo-upload .upload-slot.has-upload-error .upload-feedback {
  color: #9b3f33;
}

#photo-upload .sample-row.single,
#photo-upload .upload-row.single {
  max-width: 280px;
}

#photo-upload .full-body-upload-group {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: none;
  margin-inline: auto;
}

#photo-upload .full-body-upload-group .upload-heading {
  grid-column: 1;
}

#photo-upload .couple-reference-layout {
  display: block;
  width: 100%;
}

#photo-upload .couple-preview-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 1rem 1.25rem;
  width: 100%;
}

#photo-upload .couple-preview-stack {
  display: flex;
  flex: 0 0 280px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: 100%;
}

#photo-upload .couple-preview-row .couple-generated-preview {
  width: 280px;
  max-width: 100%;
}

#photo-upload .couple-side-controls {
  display: flex;
  flex: 0 0 min(300px, 100%);
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
  gap: 1rem;
}

#photo-upload .couple-hair-options {
  display: grid;
  gap: 0.8rem;
  width: 100%;
}

#photo-upload .couple-hair-note {
  margin: 0 0 -0.25rem;
  color: rgba(58, 48, 42, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#photo-upload .couple-hair-fieldset {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(184, 145, 102, 0.24);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.82);
}

#photo-upload .couple-hair-fieldset legend {
  padding: 0 0.25rem;
  color: #3a302a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#photo-upload .couple-hair-fieldset label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(58, 48, 42, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

#photo-upload .couple-hair-fieldset input {
  accent-color: var(--gold);
}

#photo-upload .couple-generate-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  align-self: flex-start;
  padding-bottom: 0;
}

#photo-upload .couple-generate-action .couple-generate-button {
  width: auto;
  min-width: 140px;
}

#photo-upload .couple-height-summary {
  display: grid;
  gap: 0.8rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(184, 145, 102, 0.22);
  border-radius: 16px;
  background: rgba(255, 250, 244, 0.72);
}

#photo-upload .couple-height-summary-title {
  margin: 0;
  color: rgba(58, 48, 42, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#photo-upload .couple-height-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

#photo-upload .couple-height-summary-grid div {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  background: rgba(184, 145, 102, 0.09);
}

#photo-upload .couple-height-summary-grid span {
  color: rgba(58, 48, 42, 0.62);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#photo-upload .couple-height-summary-grid strong {
  color: #3a302a;
  font-size: 0.95rem;
  line-height: 1.2;
}

#photo-upload .couple-height-summary-note {
  margin: 0;
  color: rgba(58, 48, 42, 0.62);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.45;
}

#photo-upload .couple-reference-grid {
  display: grid;
  grid-template-columns: minmax(0, 280px);
  justify-content: start;
  align-items: end;
  gap: 1rem 1.4rem;
}

#photo-upload .couple-body-preview-card {
  display: grid;
  gap: 0.65rem;
}

#photo-upload .couple-body-preview-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #3a302a;
}

#photo-upload .couple-body-preview-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border: 1px dashed rgba(184, 145, 102, 0.45);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.72);
}

#photo-upload .couple-body-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

#photo-upload .couple-body-preview-frame img[hidden] {
  display: none;
}

#photo-upload .couple-body-preview-placeholder {
  display: grid;
  place-items: center;
  padding: 1rem;
  min-height: 100%;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(58, 48, 42, 0.72);
}

#photo-upload .couple-body-preview-frame:not(.is-empty) .couple-body-preview-placeholder {
  display: none;
}

#photo-upload .couple-slim-generate-button {
  width: 100%;
  max-width: 220px;
  justify-self: center;
}

#photo-upload .couple-slim-generate-button[hidden] {
  display: none !important;
}

#photo-upload .couple-body-preview-card.is-loading .couple-slim-generate-button,
#photo-upload .couple-body-preview-card.is-loading .couple-body-type-options {
  opacity: 0.55;
  pointer-events: none;
}

#photo-upload .couple-body-preview-card.is-loading .couple-body-preview-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 250, 244, 0.72);
}

#photo-upload .couple-body-preview-card.is-loading .couple-body-preview-frame::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 3px solid rgba(184, 145, 102, 0.25);
  border-top-color: rgba(184, 145, 102, 0.95);
  border-radius: 50%;
  animation: couple-body-spin 0.8s linear infinite;
}

#photo-upload .couple-body-preview-status {
  min-height: 1rem;
  color: #7a6555;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

#photo-upload .couple-body-preview-status:not([hidden]) {
  display: block;
}

#photo-upload .couple-body-preview-card.is-slim-error .couple-body-preview-status {
  color: #9b3f33;
}

#photo-upload .couple-body-preview-card.is-loading .couple-body-type-options {
  opacity: 0.55;
  pointer-events: none;
}

@keyframes couple-body-spin {
  to { transform: rotate(360deg); }
}

#photo-upload .couple-generate-column {
  display: grid;
  gap: 0;
  align-content: end;
  flex: 0 0 280px;
  width: 280px;
  max-width: 100%;
}

#photo-upload .couple-generate-button {
  position: relative;
  z-index: 2;
  min-width: 148px;
  width: auto;
  padding: 0.65rem 1.35rem;
}

#photo-upload .couple-generate-column.is-generating .couple-generate-button,
#photo-upload .couple-preview-row.is-generating .couple-generate-action .couple-generate-button {
  pointer-events: none;
  opacity: 0.72;
}

#photo-upload .couple-complete-panel {
  position: static;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  max-width: 420px;
  margin: 0.5rem auto 0;
  align-self: center;
  justify-items: center;
  align-items: center;
  text-align: center;
  padding: 1.1rem 1.35rem;
  gap: 0.85rem;
}

#photo-upload .couple-complete-panel p {
  width: 100%;
  margin: 0;
}

#photo-upload .couple-complete-panel .btn {
  width: 100%;
  max-width: 200px;
  min-width: 0;
  margin: 0;
}

#photo-upload .couple-generate-column .photo-complete-panel {
  position: static;
  width: 100%;
  max-width: none;
  margin-top: 0;
}

#photo-upload .height-field-group {
  display: grid;
  gap: 0.4rem;
  flex: 0 0 min(280px, 100%);
  max-width: 280px;
  margin-top: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(184, 145, 102, 0.22);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.88);
}

#photo-upload .height-field-group-label {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  color: #3a302a;
}

#photo-upload .height-field-note {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(33, 26, 23, 0.68);
}

#photo-upload .height-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

#photo-upload .height-field {
  display: grid;
  gap: 0.35rem;
  max-width: none;
  margin-top: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3a302a;
}

#photo-upload .height-field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(184, 145, 102, 0.42);
  background: rgba(255, 250, 244, 0.95);
  color: #211a17;
  -webkit-text-fill-color: #211a17;
  caret-color: #211a17;
  color-scheme: light;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

#photo-upload .height-field input:focus {
  color: #211a17;
  -webkit-text-fill-color: #211a17;
}

#photo-upload .height-field input::placeholder {
  color: rgba(33, 26, 23, 0.42);
  font-weight: 600;
}

#photo-upload .couple-generated-preview {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.75rem;
  aspect-ratio: 3 / 4;
  width: 100%;
  min-height: 0;
  padding: 1rem;
  border: 1px dashed rgba(184, 145, 102, 0.45);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.72);
}

#photo-upload .couple-generated-preview.is-empty {
  background: rgba(255, 250, 244, 0.72);
}

#photo-upload .couple-generated-preview.has-image {
  padding: 0;
  border-style: solid;
  border-color: rgba(184, 145, 102, 0.28);
  background: #ece8e3;
}

#photo-upload .couple-generated-preview.has-image .couple-preview-empty {
  display: none !important;
}

#photo-upload .couple-generated-preview.has-image img {
  z-index: 1;
  opacity: 1;
}

#photo-upload .couple-preview-empty {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0 0.5rem;
  text-align: center;
  color: rgba(58, 48, 42, 0.72);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

#photo-upload .couple-generate-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.9);
}

#photo-upload .couple-generate-loading[hidden] {
  display: none !important;
}

#photo-upload .couple-generate-loading p {
  margin: 0;
  color: #3a302a;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

#photo-upload .couple-generate-spinner {
  width: 2.35rem;
  height: 2.35rem;
  border: 3px solid rgba(184, 145, 102, 0.24);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: couple-body-spin 0.8s linear infinite;
}

#photo-upload .couple-body-type-options {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.45rem;
  width: 100%;
  max-width: 220px;
  margin: 0;
  padding: 0;
  border: 0;
}

#photo-upload .couple-body-type-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3a302a;
  cursor: pointer;
}

#photo-upload .couple-body-type-option input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

#photo-upload .couple-generated-preview.has-image .couple-body-type-options {
  display: none;
}

#photo-upload .couple-body-preview-card.is-empty .couple-body-preview-frame img {
  opacity: 0.72;
}

#photo-upload .couple-generated-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0;
}

#photo-upload .couple-generated-preview img[hidden] {
  display: none;
}

#photo-upload .couple-generated-preview.has-image img:not([src]),
#photo-upload .couple-generated-preview.has-image img[src=""] {
  opacity: 0;
}

#photo-upload .couple-generated-preview .couple-preview-status,
#photo-upload .couple-generated-preview .upload-feedback {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.55rem;
  z-index: 3;
  margin-top: 0;
  text-align: center;
  white-space: normal;
}

#photo-upload .couple-generated-preview.is-empty .couple-preview-status,
#photo-upload .couple-generated-preview.is-empty .upload-feedback {
  display: none;
}

#photo-upload .couple-generated-preview:not(.has-image) .couple-preview-status,
#photo-upload .couple-generated-preview:not(.has-image) .upload-feedback {
  display: none;
}

.photo-complete-panel {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.65rem;
  width: min(360px, calc(100% - 320px));
  padding: 1rem;
  border: 1px solid rgba(184, 145, 102, 0.22);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.82);
}

.photo-complete-panel p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.photo-complete-panel .btn {
  justify-content: center;
  width: 100%;
}

.photo-complete-panel.is-warning {
  border-color: rgba(178, 79, 61, 0.38);
}

.photo-complete-panel.is-warning p {
  color: #9b3f33;
  font-weight: 700;
}

.progress-card.is-active {
  z-index: 8;
  height: 106px;
  min-height: 106px;
  background:
    linear-gradient(145deg, rgba(184, 145, 102, 0.2), transparent 52%),
    rgba(255, 250, 244, 0.98);
  border-color: rgba(184, 145, 102, 0.5);
  box-shadow: 0 24px 70px rgba(65, 46, 33, 0.16);
  transform: translateY(-5px) scale(1.04);
}

.progress-card.is-active:hover {
  transform: translateY(-7px) scale(1.05);
}

.progress-card.is-active h3 {
  font-size: 1.08rem;
}

.progress-card.is-complete {
  background:
    linear-gradient(145deg, rgba(133, 169, 120, 0.28), transparent 52%),
    rgba(249, 255, 244, 0.96);
  border-color: rgba(111, 145, 96, 0.55);
}

.progress-card.is-complete .progress-status {
  background: rgba(111, 145, 96, 0.16);
  color: #4f6f43;
}

.progress-card.is-locked {
  opacity: 0.68;
}

.progress-card.is-locked .progress-status {
  background: rgba(117, 104, 95, 0.12);
  color: var(--muted);
}

@media (max-width: 960px) {
  .mypage-top {
    position: static;
  }
  .mypage-title-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .mypage-tabs {
    width: 100%;
  }
  .mypage-tabs a {
    flex: 1 1 0;
    min-width: 0;
  }
  .credit-balance-card {
    align-self: flex-start;
    width: fit-content;
    margin: 0;
  }
  .order-progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery figure {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #211b16;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery figure:hover img { transform: scale(1.03); }

.gallery figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  font-size: 0.875rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.sample-image-zoom-preview {
  position: fixed;
  z-index: 320;
  border: 1px solid rgba(184, 145, 102, 0.42);
  border-radius: 18px;
  background: #f2e9df;
  box-shadow: 0 28px 96px rgba(20, 15, 12, 0.38);
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition:
    left 0.18s ease,
    top 0.18s ease,
    width 0.18s ease,
    height 0.18s ease,
    opacity 0.12s ease;
}

.sample-image-zoom-preview.is-visible {
  opacity: 1;
}

/* Template cards */
.template-category-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0 0 1.4rem;
  padding: 0.35rem;
  border: 1px solid rgba(184, 145, 102, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.74);
  box-shadow: 0 12px 32px rgba(65, 46, 33, 0.06);
}

.template-category-tabs button {
  min-width: 112px;
  padding: 0.62rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7a5a38;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.template-category-tabs button.is-active {
  background: var(--gold);
  color: #1a1510;
  box-shadow: 0 10px 24px rgba(184, 145, 102, 0.22);
}

.template-category-tabs button[data-empty]:not(.is-active) {
  opacity: 0.48;
}

.template-category-empty {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(184, 145, 102, 0.32);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.72);
  text-align: center;
}

.template-category-empty strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
}

.template-category-empty p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-line;
}

.coming-soon-showcase {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(420px, 1.7fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1rem, 2.5vw, 1.4rem);
  border: 1px solid rgba(184, 145, 102, 0.2);
  border-radius: 28px;
  background: rgba(255, 250, 244, 0.82);
  box-shadow: 0 22px 60px rgba(65, 46, 33, 0.08);
}

.coming-soon-copy h2 {
  max-width: 8.5em;
  margin: 0.35rem 0 1rem;
  color: #211a17;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 4vw, 3.8rem);
  font-weight: 400;
  line-height: 1.05;
}

.coming-soon-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0.35rem 0 0.4rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid rgba(184, 145, 102, 0.35);
  border-radius: 999px;
  background: rgba(184, 145, 102, 0.13);
  color: #8a633c !important;
  font-size: 0.78rem !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1 !important;
  text-transform: uppercase;
}

.coming-soon-copy > p {
  max-width: 22rem;
  color: #5f5650;
  font-size: 0.95rem;
  line-height: 1.75;
}

.customer-photo-requirement {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(184, 145, 102, 0.18);
}

.customer-photo-requirement > p {
  max-width: none;
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.customer-photo-requirement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 88px));
  gap: 0.55rem;
}

.customer-photo-requirement-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(184, 145, 102, 0.22);
  background: #f4ece3;
}

.customer-photo-requirement-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
}

.customer-photo-requirement-grid figcaption {
  padding: 0.35rem 0.45rem;
  font-size: 0.68rem;
  color: #5f5650;
  text-align: center;
}

.coming-soon-lede {
  margin-bottom: 1.2rem;
  color: #9b7955 !important;
  font-weight: 600;
}

.coming-soon-features {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.7rem;
}

.coming-soon-features div {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.2rem 0.8rem;
  align-items: center;
}

.coming-soon-features span {
  grid-row: span 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(184, 145, 102, 0.14);
  font-size: 1.05rem;
}

.coming-soon-features strong {
  color: #211a17;
  font-size: 0.92rem;
}

.coming-soon-features p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.coming-soon-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.coming-soon-image-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(65, 46, 33, 0.08);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.template-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 18px 48px rgba(65, 46, 33, 0.08);
}

.template-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.template-card > div {
  padding: 1.35rem;
}

.template-kicker {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.template-card h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.template-card p:not(.template-kicker) {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.template-card .btn {
  width: 100%;
  cursor: default;
}

.template-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 320px));
  justify-content: start;
  gap: 2rem;
  overflow: visible;
  padding: 2rem 1rem;
  margin: -2rem -1rem;
  align-items: stretch;
}

.template-collection {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 390px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 250, 244, 0.94);
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  line-height: 0;
  box-shadow: inset 0 0 0 1px var(--border);
  transform-origin: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.template-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0;
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #211b16;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  line-height: 0;
  position: relative;
  left: -1px;
  width: calc(100% + 2px);
}

.template-collage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.template-collection:hover {
  z-index: 20;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(196, 165, 116, 0.8);
  transform: scale(1.45);
}

.template-collection:hover .template-collage img {
  filter: brightness(1.06);
}

.template-collection-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1rem;
  min-height: 132px;
  line-height: 1.6;
}

.template-collection-body h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.15;
  min-height: 3.15rem;
  margin-bottom: 0.55rem;
}

.template-collection-body p {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.template-view-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.template-view-hint span + span {
  color: var(--gold);
  font-weight: 700;
}

.template-view-hint span + span::before {
  content: "·";
  margin-right: 0.45rem;
  color: var(--muted);
  font-weight: 400;
}

.detail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.template-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.template-loading {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 3rem 1.5rem;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.92);
  box-shadow: 0 20px 54px rgba(65, 46, 33, 0.08);
  text-align: center;
}

.template-loading-spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border: 3px solid rgba(184, 145, 102, 0.22);
  border-top-color: var(--gold);
  border-radius: 999px;
  animation: template-spin 0.85s linear infinite;
}

.template-loading strong {
  font-size: 1rem;
  color: var(--text);
}

.template-loading p {
  max-width: 24rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes template-spin {
  to { transform: rotate(360deg); }
}

.template-orientation-group h3 {
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.template-orientation-grid {
  display: grid;
  align-items: start;
  gap: 1rem;
  overflow: visible;
}

.template-orientation-grid.landscape {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.template-orientation-grid.portrait {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.template-orientation-grid figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f2e9df;
  transform-origin: center;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.template-orientation-grid.landscape figure {
  aspect-ratio: 4 / 3;
}

.template-orientation-grid.portrait figure {
  aspect-ratio: 3 / 4;
}

.template-orientation-grid img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 15px;
  object-fit: cover;
  object-position: center;
  transition: filter 0.28s ease;
}

.template-orientation-grid figure:hover {
  z-index: 320;
  border-color: rgba(196, 165, 116, 0.9);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
  transform: scale(2);
}

.template-orientation-grid figure:hover img {
  filter: brightness(1.06);
}

/* My Page template selection */
.template-order-section {
  padding-top: 1rem;
}

.template-order-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
}

.template-order-main {
  min-width: 0;
}

.template-catalog.compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 280px));
  justify-content: start;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.template-catalog.compact .template-collection {
  min-height: 300px;
}

.template-order-workspace .template-collection:hover {
  box-shadow:
    0 18px 48px rgba(65, 46, 33, 0.16),
    inset 0 0 0 1px rgba(196, 165, 116, 0.8);
  transform: translateY(-3px);
}

.template-order-workspace .template-collection-body {
  min-height: 112px;
}

.template-order-workspace .template-collection-body h3 {
  font-size: 1.15rem;
  min-height: 2.65rem;
}

.template-order-workspace #template-detail {
  padding-top: 2.5rem;
}

.template-order-workspace .template-orientation-grid figure:hover {
  z-index: 320;
  border-color: rgba(196, 165, 116, 0.9);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
  transform: scale(2);
}

.template-orientation-grid figure.is-selectable {
  cursor: pointer;
}

.template-select-button {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(184, 145, 102, 0.55);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.92);
  color: #7a5a38;
  font-size: 1.05rem;
  font-weight: 900;
  pointer-events: none;
  box-shadow: 0 10px 26px rgba(65, 46, 33, 0.18);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.template-orientation-grid figure.is-selectable:hover .template-select-button {
  background: rgba(255, 250, 244, 0.96);
  color: #7a5a38;
  border-color: rgba(184, 145, 102, 0.72);
  transform: translateY(-2px);
}

.template-orientation-grid figure.is-selected {
  border-color: rgba(111, 145, 96, 0.72);
}

.template-orientation-grid figure.is-selected .template-select-button {
  background: #6f9160;
  color: #fffaf4;
  border-color: #6f9160;
}

.template-orientation-grid figure.is-selected:hover .template-select-button {
  background: #6f9160;
  color: #fffaf4;
  border-color: #6f9160;
}

.selected-template-cart {
  position: fixed;
  top: var(--cart-fixed-top, calc(var(--header-h) + 12rem));
  right: max(1.5rem, calc((100vw - var(--wrap)) / 2 + 1.5rem));
  z-index: 125;
  display: flex;
  flex-direction: column;
  width: 280px;
  max-height: calc(100vh - var(--cart-fixed-top, calc(var(--header-h) + 12rem)) - 1rem);
  overflow: visible;
  padding: 1rem;
  border: 1px solid rgba(184, 145, 102, 0.24);
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 18px 48px rgba(65, 46, 33, 0.08);
}

.selected-template-cart-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.selected-template-cart-head .section-label {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.selected-template-cart h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
}

.selected-template-cart-head span {
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 42px;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: rgba(184, 145, 102, 0.16);
  color: #7a5a38;
  font-size: 1.02rem;
  font-weight: 800;
}

.selected-credit-summary {
  flex: 0 0 auto;
  margin: -0.25rem 0 0.55rem;
  color: #7a5a38;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.cart-delete-all {
  flex: 0 0 auto;
  justify-self: start;
  margin: 0 0 0.75rem;
  padding: 0.48rem 0.8rem;
  border: 1px solid rgba(184, 145, 102, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.86);
  color: #7a5a38;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cart-delete-all:hover {
  border-color: rgba(184, 145, 102, 0.42);
  background: rgba(184, 145, 102, 0.12);
}

.cart-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 15, 12, 0.34);
}

.cart-confirm-dialog {
  width: min(360px, 100%);
  padding: 1.25rem;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 22px;
  background: #fffaf4;
  box-shadow: 0 26px 90px rgba(20, 15, 12, 0.38);
}

.cart-confirm-dialog h3 {
  margin-bottom: 0.45rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
}

.cart-confirm-dialog p {
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1rem;
}

.selected-template-empty {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.selected-template-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  padding-right: 0.35rem;
  display: grid;
  gap: 0.75rem;
}

.selected-template-item {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem;
  border: 1px solid rgba(184, 145, 102, 0.16);
  border-radius: 14px;
  background: rgba(247, 241, 234, 0.64);
}

.selected-template-item img {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  transform-origin: right center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.selected-template-item img:hover {
  z-index: 60;
  transform: none;
  box-shadow: 0 22px 70px rgba(20, 15, 12, 0.34);
}

.cart-image-zoom-preview {
  position: fixed;
  z-index: 300;
  border: 1px solid rgba(184, 145, 102, 0.45);
  border-radius: 18px;
  background: #f2e9df;
  box-shadow: 0 26px 90px rgba(20, 15, 12, 0.38);
  object-fit: cover;
  pointer-events: none;
}

.selected-template-item strong {
  display: block;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.3;
}

.selected-template-item span {
  color: var(--muted);
  font-size: 0.7rem;
}

.selected-template-remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.88);
  color: #8a5f36;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.selected-template-remove:hover {
  border-color: rgba(178, 79, 61, 0.42);
  background: rgba(178, 79, 61, 0.1);
  color: #9a3f30;
  transform: translateY(-1px);
}

/* Mock order CTA */
.mock-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.9);
  box-shadow: 0 20px 54px rgba(65, 46, 33, 0.08);
}

.mock-panel h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.mock-panel p {
  color: var(--muted);
  max-width: 620px;
}

/* How to order visual flow */
.visual-flow-list {
  display: grid;
  gap: 1.25rem;
}

.visual-flow-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.9);
  box-shadow: 0 20px 54px rgba(65, 46, 33, 0.08);
}

.visual-flow-media {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #eee6dd;
}

.visual-flow-media.hover-zoom-grid {
  overflow: visible;
}

.visual-flow-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.upload-preview,
.template-preview {
  display: grid;
  gap: 0.45rem;
  padding: 0.45rem;
}

.upload-preview {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.upload-preview img {
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
  border-radius: 12px;
  background: #eeeae4;
  object-fit: contain;
}

.template-preview {
  grid-template-columns: repeat(2, 1fr);
  aspect-ratio: 4 / 3;
}

.template-preview-2 {
  display: grid;
  gap: 0.45rem;
  padding: 0.45rem;
  grid-template-columns: repeat(2, 1fr);
  aspect-ratio: 4 / 3;
}

.template-preview-2 img {
  min-height: 0;
  border-radius: 12px;
}

.template-preview img {
  min-height: 0;
  border-radius: 12px;
}

.result-preview {
  aspect-ratio: 4 / 3;
}

/* Hover zoom grid */
.hover-zoom-grid {
  position: relative;
  overflow: visible;
}

.hover-zoom-hint {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.28rem 0.75rem;
  border-radius: 99px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.25s;
}

.hover-zoom-grid:hover .hover-zoom-hint {
  opacity: 0;
}

.hover-zoom-grid img {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: zoom-in;
}

.hover-zoom-grid img:hover {
  transform: scale(2);
  z-index: 5;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.visual-flow-copy h3 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 400;
  margin: 0.65rem 0 0.5rem;
}

.visual-flow-copy p.visual-flow-highlight {
  margin: 0 0 0.55rem;
  color: #2f6fed;
  font-weight: 600;
  line-height: 1.65;
}

.visual-flow-copy p {
  color: var(--muted);
  line-height: 1.7;
}

/* How to order photo guide */
.photo-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.photo-guide-images.four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.photo-guide-images.duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
}

.photo-guide-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.9);
  box-shadow: 0 18px 48px rgba(65, 46, 33, 0.08);
}

.photo-guide-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.photo-guide-images.single {
  grid-template-columns: 1fr;
  max-width: 180px;
}

.photo-guide-images figure {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #eee6dd;
}

.photo-guide-images img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  display: block;
  object-fit: cover;
}

.photo-guide-images figcaption {
  padding: 0.4rem 0.25rem 0.45rem;
  background: rgba(255, 250, 244, 0.9);
  color: var(--text);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}

.photo-guide-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.45rem;
}

.photo-guide-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Upload guide */
.mypage-photo-state {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 2rem;
  align-items: stretch;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(184, 145, 102, 0.14), transparent 46%),
    rgba(255, 250, 244, 0.92);
  box-shadow: 0 20px 54px rgba(65, 46, 33, 0.08);
}

.mypage-photo-state h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
  margin-bottom: 1rem;
}

.mypage-photo-state p {
  color: var(--muted);
  max-width: 720px;
}

.photo-progress-card {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(184, 145, 102, 0.25);
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.94);
}

.photo-progress-card > span {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.photo-progress-card strong {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
}

.photo-progress-card p {
  font-size: 0.9rem;
}

.my-photos-section {
  padding-top: 2.25rem;
}

.my-photos-gallery {
  margin-top: 1.5rem;
}

.my-photos-empty {
  padding: 2rem;
  border: 1px dashed rgba(184, 145, 102, 0.34);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.78);
  color: var(--muted);
  text-align: center;
}

.my-photos-date-group + .my-photos-date-group {
  margin-top: 2rem;
}

.my-photos-date-group h3 {
  margin-bottom: 0.85rem;
  color: #7a5a38;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.my-photo-card {
  overflow: hidden;
  border: 1px solid rgba(184, 145, 102, 0.22);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 18px 44px rgba(65, 46, 33, 0.08);
}

.my-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.my-photo-card:hover img {
  filter: brightness(1.04);
  transform: scale(1.04);
}

.my-photo-card-body {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem;
}

.my-photo-card-body strong {
  color: var(--text);
  font-size: 0.92rem;
}

.my-photo-card-body span {
  color: var(--muted);
  font-size: 0.78rem;
}

.my-photo-card-body .btn {
  margin-top: 0.25rem;
}

.upload-group {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.92);
  box-shadow: 0 18px 48px rgba(65, 46, 33, 0.08);
}

.upload-group + .upload-group {
  margin-top: 1.5rem;
}

.upload-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.upload-heading h3 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 400;
}

.upload-note {
  max-width: 620px;
  margin-top: 0.35rem;
  color: #74685f;
  font-size: 0.9rem;
}

.height-inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.85rem;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(247, 241, 234, 0.82);
}

.height-inputs p {
  flex-basis: 100%;
  color: var(--text);
  font-weight: 700;
}

.height-inputs label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 0.5rem;
  min-width: 180px;
}

.height-inputs label span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
}

.height-inputs input {
  min-width: 0;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(184, 145, 102, 0.28);
  border-radius: 12px;
  background: #fffaf4;
  color: var(--text);
  font: inherit;
}

.height-inputs input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 145, 102, 0.14);
}

.height-inputs em {
  align-self: center;
  color: var(--muted);
  font-style: normal;
}

/* Sign up */
.signup-page .order-hero {
  padding: 1.55rem 0 1.25rem;
}

.signup-page .order-hero h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(2.35rem, 5vw, 3.6rem);
}

.signup-page .order-hero .section-label {
  margin-bottom: 0.35rem;
}

.signup-page .order-hero .section-desc {
  max-width: 560px;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.signup-page > .section-dark {
  padding: 1.8rem 0 3rem;
}

.signup-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(280px, 0.85fr);
  gap: 1.6rem;
  align-items: start;
  max-width: 1040px;
}

.signup-form,
.signup-guide {
  border: 1px solid rgba(184, 145, 102, 0.2);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 22px 70px rgba(65, 46, 33, 0.1);
  padding: clamp(1.15rem, 2.4vw, 1.65rem);
}

.profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.profile-form input[readonly] {
  color: #75685f;
  background: rgba(239, 229, 218, 0.55);
}

.service-notice {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(184, 145, 102, 0.22);
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.88);
  box-shadow: 0 18px 52px rgba(65, 46, 33, 0.08);
}

.section-dark .service-notice {
  background: rgba(255, 250, 244, 0.94);
}

.service-notice h3 {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 400;
  color: #211a17;
}

.service-notice p,
.service-notice li {
  color: #6f5f53;
  font-size: 0.94rem;
}

.service-notice .notice-ai-partner {
  display: inline;
  margin-left: 0.25rem;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(184, 145, 102, 0.18), rgba(217, 175, 113, 0.3));
  color: #8a5a1f;
  font-weight: 800;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.service-notice ul {
  display: grid;
  gap: 0.55rem;
  list-style: none;
}

.service-notice li {
  position: relative;
  padding-left: 1.15rem;
}

.service-notice li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 800;
}

.service-notice.compact {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
}

.form-row {
  display: grid;
  gap: 0.38rem;
  margin-bottom: 0.72rem;
}

.form-row label,
.form-check {
  color: #4d3a2a;
  font-size: 0.9rem;
  font-weight: 800;
}

.form-row input {
  width: 100%;
  padding: 0.74rem 0.9rem;
  border: 1px solid rgba(184, 145, 102, 0.22);
  border-radius: 16px;
  background: #fffdf9;
  color: #211a17;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.form-row input:focus {
  outline: none;
  border-color: rgba(196, 165, 116, 0.8);
  box-shadow: 0 0 0 4px rgba(184, 145, 102, 0.13);
}

.signup-consent-notice {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0.85rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(184, 145, 102, 0.2);
  border-radius: 18px;
  background: rgba(247, 241, 234, 0.7);
}

.signup-consent-notice strong {
  color: #4d3a2a;
  font-size: 0.88rem;
}

.signup-consent-notice ul {
  display: grid;
  gap: 0.42rem;
}

.signup-consent-notice li {
  position: relative;
  padding-left: 0.95rem;
  color: #75685f;
  font-size: 0.8rem;
  line-height: 1.55;
}

.signup-consent-notice li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

.id-check-row,
.password-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.id-check-row button,
.password-check-row button {
  min-height: 42px;
  padding: 0 0.9rem;
  border: 1px solid rgba(33, 26, 23, 0.14);
  border-radius: 14px;
  background: #211a17;
  color: #fffaf4;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.id-check-row button:hover,
.password-check-row button:hover {
  background: #3a302a;
}

.id-check-row button:disabled,
.password-check-row button:disabled {
  cursor: progress;
  opacity: 0.58;
}

.id-check-row button.is-checked,
.password-check-row button.is-checked {
  background: #2f7d4f;
  border-color: #2f7d4f;
  color: #fffaf4;
  cursor: default;
  opacity: 1;
}

.id-check-row button.is-checked:hover,
.password-check-row button.is-checked:hover {
  background: #267042;
}

.id-check-row button.is-checked:disabled,
.password-check-row button.is-checked:disabled {
  cursor: default;
  opacity: 1;
}

.id-check-message,
.password-check-message {
  min-height: 1.1rem;
  color: #8a7768;
  font-size: 0.78rem;
  font-style: normal;
}

.id-check-message.is-ok,
.password-check-message.is-ok {
  color: #2f7d4f;
}

.id-check-message.is-error,
.password-check-message.is-error {
  color: #a44537;
}

.form-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.95rem 0;
  color: #7a6654;
  font-weight: 500;
}

.form-check input {
  margin-top: 0.35rem;
  accent-color: var(--gold);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.auth-actions .btn {
  min-width: 150px;
  min-height: 46px;
}

.form-note {
  margin-top: 0.8rem;
  color: #8a7768;
  font-size: 0.86rem;
}

.signup-guide h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: #211a17;
}

.signup-guide li {
  position: relative;
  padding-left: 1.1rem;
  color: #6f5c4a;
}

.signup-guide li + li {
  margin-top: 0.55rem;
}

.signup-guide li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gold);
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(33, 26, 23, 0.42);
  backdrop-filter: blur(12px);
}

.login-modal-card {
  position: relative;
  width: min(430px, 100%);
  border: 1px solid rgba(184, 145, 102, 0.24);
  border-radius: 26px;
  background: #fffaf4;
  box-shadow: 0 34px 110px rgba(20, 15, 12, 0.28);
  padding: clamp(1.5rem, 4vw, 2.2rem);
}

.login-modal-card h2 {
  margin-bottom: 1.3rem;
  color: #211a17;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 400;
}

.login-modal-card .form-row {
  margin-bottom: 0.9rem;
}

.login-modal-note {
  min-height: 1.25rem;
  margin: 0.1rem 0 0.8rem;
}

.login-modal-remember {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin: 0.15rem 0 0.85rem;
}

.login-remember-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #6f6258;
  cursor: pointer;
  font-size: 0.84rem;
  user-select: none;
}

.login-remember-option input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.login-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.login-modal-actions .btn {
  width: 100%;
  min-height: 50px;
}

.login-modal-help {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  margin-top: 0.8rem;
  color: #8a7768;
  font-size: 0.84rem;
  text-align: center;
}

.login-reset-link {
  border: 0;
  background: transparent;
  color: #8a7768;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.login-reset-link:hover {
  color: #211a17;
}

.login-reset-panel {
  width: 100%;
}

.login-reset-panel button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(184, 145, 102, 0.26);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.68);
  color: #6d4d2f;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.login-reset-panel button:hover {
  border-color: rgba(184, 145, 102, 0.55);
  background: #fffdf9;
  color: #211a17;
}

.login-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(33, 26, 23, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #5f5650;
  cursor: pointer;
  font-size: 1.2rem;
}

.login-modal-close:hover {
  color: #211a17;
  border-color: rgba(184, 145, 102, 0.5);
}

.upload-heading span {
  color: #8a7768;
  font-size: 0.82rem;
}

.sample-row,
.upload-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.sample-row.single,
.upload-row.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 360px;
}

.sample-row figure,
.upload-slot {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: 18px;
  border: 1px solid rgba(184, 145, 102, 0.24);
  background: #f4ece3;
}

.sample-row figure {
  margin-bottom: 1rem;
}

.sample-row img,
.upload-slot img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.sample-row figcaption,
.upload-slot span {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.88);
  color: #3a302a;
  box-shadow: 0 10px 28px rgba(65, 46, 33, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
}

.upload-slot {
  display: block;
  cursor: pointer;
}

.upload-slot input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-slot img:not([src]) {
  display: none;
}

.upload-slot::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px dashed rgba(184, 145, 102, 0.45);
  border-radius: 14px;
}

.upload-slot strong {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: 120px;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(184, 145, 102, 0.7);
  border-radius: 999px;
  color: #3a302a;
  text-align: center;
  background: rgba(255, 250, 244, 0.9);
  box-shadow: 0 12px 32px rgba(65, 46, 33, 0.12);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.upload-slot:hover strong {
  background: var(--gold);
  color: #1a1510;
  transform: translate(-50%, -50%) translateY(-2px);
}

.upload-slot.has-image strong {
  top: auto;
  bottom: 1rem;
  transform: translateX(-50%);
}

.upload-slot.has-image:hover strong {
  transform: translateX(-50%) translateY(-2px);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  counter-reset: none;
}

.steps li {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.steps h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.steps p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.price-card {
  position: relative;
  padding: 2.2rem 1.5rem 1.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 18px 48px rgba(65, 46, 33, 0.08);
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(238, 225, 211, 0.82));
}

.price-card.unavailable {
  opacity: 0.78;
}

.badge {
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #1a1510;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price {
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.price span {
  display: block;
  font-size: 3.25rem;
  color: var(--text);
  font-family: var(--serif);
  line-height: 0.98;
}

.credit-count {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
  color: #7a5a38;
  font-weight: 900;
}

.credit-count strong {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
}

.credit-count span {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.credit-rate {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-height: 32px;
  margin-bottom: 1.15rem;
  color: #553b25;
  font-size: 0.88rem;
  font-weight: 900;
}

.credit-rate b {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  background: rgba(184, 145, 102, 0.17);
  color: #7a4f22;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.price-card ul {
  flex: 1;
  margin-bottom: 1.5rem;
}

.price-card li {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.price-card .btn { width: 100%; }

.price-card .btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
  pointer-events: none;
}

/* Review Page */
.review-section {
  padding: 3rem 0 5rem;
}

.review-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--muted);
}

.review-empty p {
  margin-bottom: 1.5rem;
}

.review-template-group {
  margin-bottom: 3rem;
}

.review-template-group + .review-template-group {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

.review-template-label {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.review-template-meta {
  font-size: 0.825rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.review-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.85rem;
}

.review-photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 250, 244, 0.8);
  aspect-ratio: 3/4;
}

.review-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.review-photo-item:hover img {
  opacity: 0.85;
}

.review-photo-remove {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(30, 20, 15, 0.72);
  color: #fffaf4;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
  z-index: 5;
}

.review-photo-remove:hover {
  background: #c0392b;
}

.review-photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.6rem;
  font-size: 0.72rem;
  color: #fffaf4;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
}

.review-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 2rem;
  padding: 1rem;
  border: 1px solid rgba(184, 145, 102, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(184, 145, 102, 0.12), transparent 42%),
    rgba(255, 250, 244, 0.88);
  box-shadow: 0 18px 46px rgba(65, 46, 33, 0.08);
}

.review-action-bar .review-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  color: #7a5a38;
  font-size: 0.92rem;
  font-weight: 800;
}

.review-action-bar .review-summary strong {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.review-action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.review-action-buttons .btn {
  min-height: 42px;
  padding-inline: 1rem;
}

.review-action-buttons #review-confirm-btn {
  min-width: 150px;
  box-shadow: 0 14px 32px rgba(184, 145, 102, 0.22);
}

.review-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.review-section-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
}

.review-total-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  color: #1a1510;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* Mobile nav */
@media (max-width: 900px) {
  .site-nav, .site-header > .btn-gold, .site-header-bar > .btn-gold { display: none; }
  .menu-toggle { display: block; }
  .brand {
    position: static;
    transform: none;
    margin-right: auto;
  }
  .language-switcher {
    margin-left: 0;
  }
  .header-auth {
    margin-left: auto;
  }
  .header-generation-status {
    margin-right: 0.35rem;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-auth .header-user-link {
    max-width: 96px;
  }

  .site-header.nav-open .site-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 1rem max(1.5rem, calc((100vw - min(var(--wrap), 100%)) / 2 + 1.5rem)) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    margin-left: 0;
    gap: 1rem;
    z-index: 99;
  }
}

@media (max-width: 1200px) {
  .site-nav {
    gap: 0.9rem;
  }
  .header-auth .header-user-link {
    max-width: 112px;
  }
}

@media (max-width: 767px) {
  .hero { align-items: center; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .trust { justify-content: center; }
  .mock-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .mypage-photo-state {
    grid-template-columns: 1fr;
    padding: 1.35rem;
  }
  .order-progress-grid {
    grid-template-columns: 1fr;
  }
  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .upload-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .sample-row,
  .upload-row {
    grid-template-columns: 1fr;
  }
  .photo-complete-panel {
    position: static;
    width: 100%;
    margin-top: 1rem;
  }
  .template-order-workspace {
    grid-template-columns: 1fr;
  }
  .coming-soon-showcase {
    grid-template-columns: 1fr;
  }
  .coming-soon-copy h2,
  .coming-soon-copy > p {
    max-width: none;
  }
  .selected-template-cart {
    position: static;
    max-height: none;
  }
  .review-action-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .review-action-buttons {
    width: 100%;
  }
  .review-action-buttons .btn,
  .review-action-buttons button {
    flex: 1 1 auto;
    justify-content: center;
  }
  #photo-upload .upload-note {
    white-space: normal;
  }
  #photo-upload .face-upload-group .upload-heading {
    align-items: stretch;
    flex-direction: column;
  }

  #photo-upload .upload-heading-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  #photo-upload .ai-partner-button {
    min-width: 0;
    width: 100%;
  }

  #photo-upload .height-field-group {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }

  #photo-upload .face-upload-group .sample-row,
  #photo-upload .face-upload-group .upload-row {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }
  #photo-upload .full-body-upload-group {
    display: block;
    max-width: none;
  }

  #photo-upload .couple-reference-layout {
    flex-direction: column;
    align-items: stretch;
  }

  #photo-upload .couple-preview-row {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: wrap;
  }

  #photo-upload .couple-preview-stack {
    flex: 1 1 auto;
    width: 100%;
  }

  #photo-upload .couple-preview-row .couple-generated-preview {
    flex: 1 1 auto;
    width: 100%;
  }

  #photo-upload .couple-side-controls {
    flex: 1 1 auto;
    width: 100%;
  }

  #photo-upload .couple-generate-action {
    width: 100%;
    align-self: stretch;
  }

  #photo-upload .couple-generate-action .couple-generate-button {
    width: 100%;
  }

  #photo-upload .couple-height-summary-grid {
    grid-template-columns: 1fr;
  }

  #photo-upload .couple-complete-panel {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    margin: 0.75rem auto 0;
    align-items: center;
    text-align: center;
  }

  #photo-upload .couple-complete-panel .btn {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  #photo-upload .couple-reference-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
  }

  #photo-upload .full-body-upload-group .upload-row.single {
    max-width: 280px;
    margin-bottom: 0.75rem;
  }
  .photo-guide-grid {
    grid-template-columns: 1fr;
  }

  .photo-guide-images.four-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .visual-flow-card {
    grid-template-columns: 1fr;
  }
  .signup-layout {
    grid-template-columns: 1fr;
  }
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .floating-top-link {
    left: 1rem;
    bottom: 1rem;
    width: 50px;
    height: 50px;
    font-size: 0.7rem;
  }
}
