/* Palsaik member draft. Mobile-first phone frame. */

:root {
  --red: #C8102E;
  --red-dark: #9b0c23;
  --cream: #FAF9F7;
  --ink: #1c1c1e;
  --muted: #6d6d72;
  --faint: #8e8e93;
  --card: #ffffff;
  --line: rgba(28, 28, 30, 0.08);
  --bronze: #8a5a32;
  --phone: 430px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p {
  margin: 0;
}

.stage {
  min-height: 100dvh;
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--phone);
  height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  overflow: hidden;
}

.screen {
  flex: 1;
  overflow: auto;
  padding: 6px 20px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: max(14px, env(safe-area-inset-top)) 20px 8px;
}

.brand-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.draft-pill {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid rgba(200, 16, 46, 0.35);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.topbar-rewards {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.back-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.page-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.points-pill {
  justify-self: end;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.hello {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.guest {
  margin: 2px 2px 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.tier-card {
  margin-top: 16px;
  padding: 18px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(28, 28, 30, 0.05);
}

.tier-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow,
.section-label {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tier-name {
  margin-top: 4px;
  color: var(--bronze);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.tier-next {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
}

.tier-pts {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.progress {
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #efeae4;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bronze), var(--red));
}

.progress-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.rewards-band {
  margin-top: 22px;
}

.section-label {
  padding: 0 2px;
}

.ready-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 128px;
  margin-top: 10px;
  padding: 22px 20px;
  border-radius: 26px;
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(255, 255, 255, 0.2), transparent 55%),
    linear-gradient(155deg, #e31b3c 0%, var(--red) 52%, #8e0b20 100%);
  box-shadow: 0 16px 32px rgba(200, 16, 46, 0.22);
  color: #fff;
  text-decoration: none;
}

.ready-card h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.ready-card p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.ready-chevron {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.ready-chevron svg {
  width: 18px;
  height: 18px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 120px;
  padding: 16px;
  border-radius: 24px;
  text-decoration: none;
}

.action-card svg {
  width: 22px;
  height: 22px;
}

.action-name {
  display: block;
  margin-top: 18px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.action-sub {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
}

.action-play {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 28px rgba(28, 28, 30, 0.16);
}

.action-play .action-sub {
  color: rgba(255, 255, 255, 0.65);
}

.action-rewards {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(28, 28, 30, 0.05);
}

.action-rewards svg {
  color: var(--red);
}

.action-rewards .action-sub {
  color: var(--muted);
}

.ready-card:active,
.action-card:active,
.claim-btn:active,
.btn:active {
  transform: scale(0.985);
}

.draft-note {
  margin: 22px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(200, 16, 46, 0.06);
  color: #7a1a28;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.voucher {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(28, 28, 30, 0.05);
}

.voucher-stub {
  position: relative;
  display: flex;
  flex: 0 0 118px;
  align-items: center;
  justify-content: center;
  border-right: 1px dashed rgba(200, 16, 46, 0.32);
  color: var(--red);
}

.voucher-stub::before,
.voucher-stub::after {
  content: "";
  position: absolute;
  right: -9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cream);
}

.voucher-stub::before {
  top: -9px;
}

.voucher-stub::after {
  bottom: -9px;
}

.voucher-rm {
  display: flex;
  align-items: flex-start;
  line-height: 0.9;
}

.rm-sign {
  margin-top: 4px;
  margin-right: 1px;
  font-size: 13px;
  font-weight: 800;
}

.rm-num {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.voucher-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 16px 14px 14px 16px;
}

.voucher-pts {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.voucher-rate {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.claim-btn {
  margin-top: 12px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.need-pts {
  margin-top: 12px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 700;
}

.voucher.is-locked .voucher-stub {
  border-right-color: rgba(28, 28, 30, 0.12);
  color: var(--faint);
  background: #f4f3f1;
}

.voucher.is-locked .voucher-pts {
  color: #5c5c60;
}

.tabbar {
  display: grid;
  flex-shrink: 0;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0 2px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.tabbar a svg {
  width: 22px;
  height: 22px;
}

.tabbar a.is-active {
  color: var(--red);
}

.modal {
  position: absolute;
  z-index: 5;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px 24px;
  background: rgba(28, 28, 30, 0.46);
  inset: 0;
}

.modal:not([hidden]) {
  display: flex;
}

.modal-card {
  width: min(100%, 360px);
  padding: 20px 18px 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(28, 28, 30, 0.2);
}

.modal-card h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.claim-copy {
  margin-top: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.btn {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.phone.is-modal-open .screen {
  overflow: hidden;
}

@media (min-width: 520px) {
  body {
    background: #e4dfd8;
  }

  .stage {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 24px 16px;
  }

  .phone {
    height: min(844px, calc(100dvh - 48px));
    border: 10px solid #141416;
    border-radius: 36px;
    box-shadow: 0 24px 60px rgba(20, 20, 22, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ready-card:active,
  .action-card:active,
  .claim-btn:active,
  .btn:active {
    transform: none;
  }
}
