:root {
  --pink-50: #fff7fb;
  --pink-100: #ffe8f2;
  --pink-200: #ffcfe2;
  --pink-300: #f9a8c8;
  --pink-500: #ed4f91;
  --pink-600: #d92d78;
  --ink: #241d2c;
  --muted: #766b78;
  --line: #ead9df;
  --white: #ffffff;
  --success-bg: #edf9f4;
  --success-text: #17634e;
  --warning-bg: #fff7e8;
  --warning-text: #855a12;
  --danger-bg: #fff0f1;
  --danger-text: #9b3040;
  --shadow-card: 0 22px 60px rgba(133, 73, 94, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f7e4eb;
}

body.customer-page {
  min-height: 100vh;
  margin: 0;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(150deg, #fff6fa 0%, #ffd6e6 54%, #f7a9c7 100%);
  color: var(--ink);
  font-family: var(--font-sans);
}

button,
input {
  font: inherit;
}

.customer-shell {
  width: min(100%, 570px);
  margin: 0 auto;
}

.customer-card {
  overflow: hidden;
  background: rgba(255, 250, 251, 0.96);
  border: 1px solid rgba(219, 178, 192, 0.72);
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  animation: customerEnter 360ms ease-out;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: 142px;
  height: 64px;
  object-fit: cover;
  object-position: center;
}

.brand-event {
  color: #725a65;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-align: right;
  text-transform: uppercase;
}

.customer-main {
  padding: 34px 22px 28px;
}

.event-heading {
  margin: 0;
  color: var(--ink);
  font-size: clamp(27px, 7vw, 36px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.16;
  text-align: center;
}

.event-subtitle {
  max-width: 430px;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  text-align: center;
}

.event-info-card {
  display: grid;
  gap: 15px;
  margin-top: 26px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.event-info-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.event-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--pink-100);
  border-radius: 11px;
  color: var(--pink-600);
  font-size: 17px;
}

.event-label {
  margin: 0 0 4px;
  color: #8a7380;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.event-value {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.countdown-intro {
  margin: 18px 0 9px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.countdown-intro strong {
  color: var(--pink-600);
}

.countdown-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.countdown-item {
  min-width: 0;
  padding: 12px 5px 10px;
  background: linear-gradient(145deg, var(--pink-500), var(--pink-600));
  border-radius: 14px;
  box-shadow: 0 7px 15px rgba(195, 63, 114, 0.22);
  color: var(--white);
  text-align: center;
}

.countdown-value {
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 750;
  line-height: 1;
}

.countdown-label {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  opacity: 0.92;
  text-transform: uppercase;
}

.lookup-card,
.action-card,
.qr-panel,
.notice-card {
  margin-top: 24px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.phone-field {
  position: relative;
}

.phone-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--pink-500);
  font-size: 20px;
  transform: translateY(-50%);
  pointer-events: none;
}

.phone-input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px 14px 48px;
  background: var(--pink-50);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.phone-input:focus {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 4px rgba(214, 83, 131, 0.12);
}

.primary-button,
.secondary-button,
.text-button {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button {
  margin-top: 12px;
  background: linear-gradient(135deg, var(--pink-500), var(--pink-600));
  border: 0;
  box-shadow: 0 8px 18px rgba(195, 63, 114, 0.22);
  color: var(--white);
}

.secondary-button {
  margin-top: 10px;
  background: var(--white);
  border: 1.5px solid var(--pink-300);
  color: var(--pink-600);
}

.text-button {
  min-height: 42px;
  background: transparent;
  border: 0;
  color: #7d6a73;
  font-weight: 600;
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(195, 63, 114, 0.24);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.privacy-note {
  margin: 13px 0 0;
  color: #8b7c83;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.form-status {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.form-status.show {
  display: block;
}

.form-status.error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.form-status.failure {
  background: var(--danger-bg);
  border: 1px solid rgba(185, 28, 28, 0.24);
  color: var(--danger-text);
}

.form-status.failure > div + div {
  margin-top: 7px;
}

.form-status .failure-reason strong {
  font-weight: 800;
}

.form-status.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.form-status.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.invite-title {
  margin: 0;
  color: var(--pink-600);
  font-size: clamp(23px, 6vw, 31px);
  line-height: 1.22;
  text-align: center;
}

.invite-copy {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  text-align: center;
}

.invite-copy strong {
  color: var(--pink-600);
}

.details-list {
  display: grid;
  gap: 13px;
  margin-top: 22px;
  padding: 18px;
  background: var(--pink-50);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.details-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 9px;
  font-size: 14px;
  line-height: 1.55;
}

.details-row dt {
  color: #836d78;
  font-weight: 650;
}

.details-row dd {
  margin: 0;
  color: var(--ink);
}

.session-name {
  color: #b91860;
  font-weight: 800;
}

.action-card h2,
.qr-panel h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 19px;
  text-align: center;
}

.action-card > p,
.qr-panel > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.qr-panel {
  scroll-margin-top: 18px;
  text-align: center;
}

.qr-panel[hidden] {
  display: none;
}

.qr-code {
  display: inline-flex;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.qr-code img,
.qr-code canvas {
  display: block;
  max-width: 100%;
  height: auto !important;
}

.registration-code {
  display: inline-block;
  margin: 13px 0 0;
  padding: 7px 12px;
  background: var(--pink-100);
  border-radius: 999px;
  color: var(--pink-600);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.notice-card {
  background: linear-gradient(145deg, #fff8fa, #fff0f5);
  color: #624f59;
  font-size: 14px;
  line-height: 1.65;
  text-align: center;
}

.page-link {
  display: block;
  margin-top: 16px;
  color: #806c76;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
}

.page-link:hover {
  color: var(--pink-600);
  text-decoration: underline;
}

.loading-card {
  padding: 42px 24px;
  color: var(--muted);
  text-align: center;
}

.loading-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border: 4px solid var(--pink-200);
  border-top-color: var(--pink-500);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.confirm-dialog {
  width: min(calc(100% - 28px), 430px);
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.confirm-dialog::backdrop {
  background: rgba(45, 29, 37, 0.52);
  backdrop-filter: blur(3px);
}

.dialog-body {
  padding: 24px;
  text-align: center;
}

.dialog-body h2 {
  margin: 0 0 9px;
  color: var(--pink-600);
  font-size: 21px;
}

.dialog-body p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dialog-actions button {
  min-height: 46px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.dialog-cancel {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}

.dialog-confirm {
  background: var(--danger-bg);
  border: 1px solid #f0c5ca;
  color: var(--danger-text);
}

@keyframes customerEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 430px) {
  body.customer-page {
    padding-right: 8px;
    padding-left: 8px;
  }

  .customer-card {
    border-radius: 22px;
  }

  .brand-bar {
    min-height: 68px;
    padding: 10px 16px;
  }

  .brand-logo {
    width: 112px;
    height: 50px;
  }

  .brand-event {
    max-width: 180px;
    font-size: 10px;
  }

  .customer-main {
    padding: 28px 16px 22px;
  }

  .event-info-card,
  .lookup-card,
  .action-card,
  .qr-panel,
  .notice-card {
    padding: 16px;
  }

  .details-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-card {
    animation: none;
  }
}
