:root {
  color-scheme: light;
  --forest-950: #071b14;
  --forest-900: #0b2a20;
  --forest-800: #0e3d2d;
  --forest-700: #14583e;
  --green-500: #35a868;
  --green-300: #7bd39a;
  --lime: #dff36a;
  --cream: #f4f1e7;
  --paper: #fffefa;
  --ink: #10261e;
  --muted: #718078;
  --line: #dfe6df;
  --danger: #bc4039;
  --success: #19734a;
  font-family: Pretendard, "Noto Sans KR", Inter, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f3f6f1;
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.modal-open { overflow: hidden; }

/* Participant experience */

.event-body {
  min-height: 100svh;
  background: var(--forest-950);
}

.event-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(420px, .82fr);
  min-height: 100svh;
}

.event-hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(3, 18, 12, .96) 0%, rgba(3, 18, 12, .67) 43%, rgba(3, 18, 12, .1) 100%),
    url("/static/assets/greent-hero-win.webp") center / cover no-repeat;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 72%, rgba(223, 243, 106, .13), transparent 27%),
    linear-gradient(0deg, rgba(5, 24, 17, .68), transparent 38%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(720px, 78%);
  margin: 0 auto;
  padding: 64px 0 110px;
}

.greent-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -.07em;
}

.brand-t { color: var(--lime); }

.tee-mark {
  position: relative;
  display: inline-block;
  width: 33px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
}

.tee-mark::after {
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 2px;
  height: 13px;
  background: var(--lime);
  content: "";
  transform: translateX(-50%);
}

.tee-mark i {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 13px;
  height: 2px;
  border-radius: 50%;
  background: var(--lime);
  transform: translateX(-50%);
}

.eyebrow, .step-label {
  margin: 52px 0 18px;
  color: var(--lime);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .2em;
}

.hero-content h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(3.3rem, 5.4vw, 6.6rem);
  font-weight: 760;
  line-height: .98;
  letter-spacing: -.075em;
}

.hero-content h1 em {
  color: var(--lime);
  font-style: normal;
}

.hero-copy {
  margin: 30px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: clamp(.96rem, 1.25vw, 1.14rem);
  line-height: 1.75;
}

.event-badges {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.event-badges span {
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .06);
  font-size: .76rem;
  backdrop-filter: blur(8px);
}

.hero-caption {
  position: absolute;
  z-index: 1;
  bottom: 34px;
  left: 5%;
  margin: 0;
  color: rgba(255, 255, 255, .32);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .22em;
  writing-mode: vertical-rl;
}

.entry-side {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 46px clamp(26px, 4vw, 76px);
  background:
    radial-gradient(circle at 100% 0, rgba(223, 243, 106, .17), transparent 22rem),
    var(--paper);
}

.mobile-brand { display: none; color: var(--forest-800); }
.mobile-brand .tee-mark { border-color: var(--forest-800); }

.entry-card {
  width: min(100%, 470px);
  animation: card-in .65s cubic-bezier(.2, .8, .2, 1) both;
}

.entry-card .step-label,
.lose-card .step-label,
.win-content .step-label {
  margin: 0 0 14px;
  color: var(--green-500);
}

.entry-card h2,
.lose-card h2,
.win-dialog h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: clamp(2.15rem, 3.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.065em;
}

.entry-intro {
  margin: 18px 0 36px;
  color: var(--muted);
  line-height: 1.65;
}

.stack { display: grid; gap: 17px; }

.field-label {
  color: var(--forest-900);
  font-size: .82rem;
  font-weight: 800;
}

.phone-field {
  display: flex;
  align-items: center;
  min-height: 60px;
  border: 1px solid #cfd9d1;
  border-radius: 14px;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}

.phone-field:focus-within {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(53, 168, 104, .13);
}

.phone-field input {
  min-width: 0;
  height: 58px;
  flex: 1;
  padding: 0 17px;
  border: 0;
  outline: 0;
  color: var(--forest-900);
  background: transparent;
  font-size: 1.05rem;
  font-weight: 700;
}

.phone-field input::placeholder { color: #a7b1aa; font-weight: 500; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.55;
}

.consent input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--forest-700);
}

.golf-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  width: 100%;
  margin-top: 5px;
  padding: 0 10px 0 22px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--forest-800);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(14, 61, 45, .18);
  transition: transform .18s, background .18s;
}

.golf-button b {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  color: var(--forest-900);
  background: var(--lime);
  font-size: 1.15rem;
}

.golf-button:hover { background: var(--forest-700); transform: translateY(-2px); }
.golf-button:disabled { opacity: .58; cursor: wait; transform: none; }

.message {
  min-height: 20px;
  margin: 13px 0 0;
  color: var(--danger);
  font-size: .82rem;
}

.message.success { color: var(--success); }

.entry-note {
  margin: 14px 0 0;
  color: #98a49c;
  font-size: .72rem;
  text-align: center;
}

.lose-card {
  width: min(100%, 510px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(7, 27, 20, .12);
  animation: card-in .55s cubic-bezier(.2, .8, .2, 1) both;
}

.lose-card > img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.lose-content { padding: 32px; }
.lose-content h2 { font-size: 2.35rem; }

.lose-content > p:not(.step-label) {
  margin: 17px 0 25px;
  color: var(--muted);
  line-height: 1.65;
}

.secondary-action { margin-top: 0; }

.text-button {
  display: block;
  margin: 15px auto 0;
  border: 0;
  color: #8b9890;
  background: none;
  font-size: .76rem;
  text-decoration: underline;
  cursor: pointer;
}

.win-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.win-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 16, 11, .82);
  backdrop-filter: blur(11px);
  animation: fade-in .28s ease both;
}

.win-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 1.08fr) minmax(320px, .92fr);
  width: min(100%, 940px);
  min-height: 570px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 35px 100px rgba(0, 0, 0, .42);
  animation: pop-in .55s cubic-bezier(.2, .9, .2, 1) both;
}

.win-image {
  position: relative;
  min-height: 390px;
  background:
    linear-gradient(0deg, rgba(6, 32, 22, .5), transparent 60%),
    url("/static/assets/greent-hero-win.webp") 62% center / cover no-repeat;
}

.win-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 999px;
  color: #fff;
  background: rgba(6, 38, 25, .55);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .18em;
  backdrop-filter: blur(7px);
}

.win-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 60px);
}

.win-content h2 { font-size: clamp(2.2rem, 3.8vw, 3.55rem); }

.win-content > p:not(.step-label):not(.countdown) {
  margin: 20px 0 26px;
  color: var(--muted);
  line-height: 1.65;
}

.countdown {
  margin: 14px 0 0;
  color: #8b9890;
  font-size: .76rem;
  text-align: center;
}

.countdown strong { color: var(--green-500); }

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(22px) scale(.975); }
}

/* Admin */

.page {
  width: min(100% - 32px, 620px);
  margin: 0 auto;
  padding: 72px 0;
}

.admin-page { width: min(100% - 32px, 1080px); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--forest-700);
  font-weight: 900;
  letter-spacing: -.03em;
}

.egg {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 2px solid var(--forest-700);
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 40% 35%, #fff 0 2px, #edf3ee 3px 5px);
}

.page h1 {
  margin: 24px 0 12px;
  color: var(--forest-900);
  font-size: clamp(2rem, 7vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -.06em;
}

.admin-page h1 { font-size: clamp(2rem, 5vw, 3.35rem); }

.lead {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 20px 70px rgba(14, 61, 45, .08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.full { grid-column: 1 / -1; }

.card label {
  display: grid;
  gap: 8px;
  font-size: .92rem;
  font-weight: 700;
}

.card input:not([type="checkbox"]), .card select, .card textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cad6ce;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.card textarea {
  padding: 12px 14px;
  resize: vertical;
  font: inherit;
  line-height: 1.6;
}

.card input:focus, .card select:focus, .card textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(53, 168, 104, .14);
}

.card input[type="checkbox"] { width: 18px; min-height: 18px; }

.button {
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--forest-800);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(14, 61, 45, .14);
}

.button:hover { background: var(--forest-700); transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.secondary { color: var(--forest-900); background: #e8eee9; box-shadow: none; }
.button.danger { color: #fff; background: var(--danger); box-shadow: none; }
.button.compact { min-height: 32px; padding: 0 12px; border-radius: 9px; font-weight: 700; font-size: 13px; }

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-header h1 { margin-bottom: 0; }
.logout { width: auto; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.tab.active {
  color: #fff;
  border-color: var(--forest-800);
  background: var(--forest-800);
}

.section-title { margin: 0 0 8px; color: var(--forest-900); font-size: 1.35rem; }
.help { margin: 0 0 20px; color: var(--muted); font-size: .92rem; line-height: 1.55; }

.upload-zone {
  padding: 28px;
  border: 1px dashed #a9bcae;
  border-radius: 16px;
  background: #f5f8f5;
  text-align: center;
}

.upload-zone input { min-height: auto !important; padding: 10px !important; }

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric {
  padding: 18px;
  border-radius: 15px;
  background: #edf4ef;
}

.metric strong { display: block; margin-top: 7px; color: var(--forest-800); font-size: 1.8rem; }
.metric span { color: var(--muted); font-size: .84rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .78rem; }
.won { color: var(--success); font-weight: 800; }
.lost { color: var(--muted); }

.file-preview {
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #edf4ef;
  color: var(--muted);
  font: .82rem/1.55 ui-monospace, monospace;
  white-space: pre-wrap;
}

@media (max-width: 1060px) {
  .event-shell { grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); }
  .hero-content { width: 84%; }
}

@media (max-width: 780px) {
  .event-shell { display: block; min-height: 100svh; background: var(--paper); }
  .event-hero { min-height: 46svh; background-position: 60% center; }
  .hero-content { align-self: flex-end; width: 100%; padding: 34px 26px 45px; }
  .hero-content .greent-brand, .eyebrow, .hero-copy, .event-badges, .hero-caption { display: none; }
  .hero-content h1 { font-size: clamp(2.5rem, 12vw, 4.3rem); }
  .entry-side {
    display: block;
    min-height: 54svh;
    margin-top: -22px;
    padding: 0 20px 42px;
    border-radius: 24px 24px 0 0;
    position: relative;
    z-index: 3;
  }
  .mobile-brand { display: flex; padding: 30px 0 34px; font-size: 1.28rem; }
  .entry-card, .lose-card { width: 100%; }
  .entry-card h2 { font-size: 2.3rem; }
  .lose-card > img { height: 205px; }
  .win-dialog {
    display: block;
    width: min(100%, 480px);
    max-height: calc(100svh - 32px);
    min-height: 0;
    overflow-y: auto;
    border-radius: 22px;
  }
  .win-image { min-height: 230px; background-position: 66% 66%; }
  .win-content { padding: 30px; }
  .win-content h2 { font-size: 2.3rem; }
}

@media (max-width: 680px) {
  .page { padding: 42px 0; }
  .card { padding: 22px; border-radius: 18px; }
  .grid, .summary { grid-template-columns: 1fr; }
  .admin-header { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
