:root {
  --paper: #f4f1ec;
  --card: #fffefa;
  --ink: #171614;
  --muted: #746f68;
  --line: #d9d2c8;
  --accent: #bd251d;
  --dark: #17191c;
  --dark-soft: #24272c;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --shadow: 0 24px 70px rgba(30, 25, 20, .09);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.contest-site-header {
  width: min(1480px, calc(100% - 48px));
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contest-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 800; letter-spacing: .12em; }
.contest-brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--accent); border-radius: 50%; font-family: Georgia, serif; font-size: 19px; letter-spacing: 0; }
.contest-site-header nav { display: flex; align-items: center; gap: 12px; }
.contest-site-header nav a { padding: 10px 14px; color: #5f5a54; text-decoration: none; font-size: 14px; font-weight: 700; border-radius: 999px; }
.contest-site-header nav a:hover { background: rgba(23, 22, 20, .06); color: var(--ink); }
.contest-site-header .header-login { color: white; background: var(--ink); }
.contest-site-header .header-login:hover { color: white; background: var(--accent); }

.contest-page { width: min(1480px, calc(100% - 48px)); margin: 0 auto; }
.contest-hero {
  min-height: 370px;
  position: relative;
  overflow: hidden;
  padding: 64px 68px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, .55fr);
  align-items: start;
  gap: 72px;
  color: white;
  background:
    radial-gradient(circle at 80% 12%, rgba(189, 37, 29, .32), transparent 27%),
    radial-gradient(circle at 12% 120%, rgba(91, 104, 122, .28), transparent 34%),
    linear-gradient(135deg, #101113 0%, #202329 56%, #151619 100%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.contest-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to right, black, transparent 78%); }
.hero-copy, .hero-facts { position: relative; z-index: 2; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 34px; }
.hero-meta > span { padding: 8px 11px; color: rgba(255,255,255,.72); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: 12px; font-weight: 700; }
.hero-meta .status-pill { color: #fff; background: rgba(189, 37, 29, .86); border-color: transparent; }
.hero-meta .status-closed { background: rgba(255,255,255,.12); }
.hero-eyebrow, .section-kicker { margin: 0 0 14px; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.hero-copy h1 { max-width: 860px; margin: 0; font-size: clamp(38px, 5vw, 70px); line-height: 1.04; letter-spacing: -.055em; word-break: keep-all; }
.hero-facts { min-width: 0; margin: 0; padding: 8px 0 0; }
.hero-facts > div { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.13); }
.hero-facts > div:last-child { border-bottom: 0; }
.hero-facts dt { margin-bottom: 8px; color: rgba(255,255,255,.46); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.hero-facts dd { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.45; }
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; pointer-events: none; }
.hero-orbit-one { width: 430px; height: 430px; right: -120px; top: -215px; }
.hero-orbit-two { width: 230px; height: 230px; right: 120px; top: -120px; border-color: rgba(189,37,29,.35); }
.panel-status { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.panel-status .admission-card,
.panel-status .login-required,
.panel-status .application-unavailable { min-height: 0; }
.panel-status .admission-card > div,
.panel-status .login-required,
.panel-status .application-unavailable { width: 100%; margin: 0; }

.contest-workspace { display: grid; grid-template-columns: 495px minmax(0, 1fr); gap: 28px; align-items: start; padding: 30px 0 96px; }
.contest-guide, .application-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: 0 12px 40px rgba(36,31,26,.045); }
.contest-guide { position: sticky; top: 24px; padding: 34px 30px; }
.contest-guide h2, .application-heading h2, .admission-card h2, .login-required h2, .application-unavailable h2 { margin: 0; font-size: 26px; line-height: 1.25; letter-spacing: -.04em; }
.guide-steps { list-style: none; margin: 34px 0; padding: 0; }
.guide-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid #e8e2da; }
.guide-steps li > span { color: #b9b0a6; font-family: Georgia, serif; font-size: 18px; }
.guide-steps strong { display: block; margin-bottom: 6px; font-size: 14px; }
.guide-steps p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.part-summary { padding: 22px; color: white; background: var(--dark); border-radius: var(--radius-lg); }
.part-summary h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; color: rgba(255,255,255,.5); font-size: 11px; letter-spacing: .1em; }
.part-summary .part-count { padding: 3px 9px; color: rgba(255,255,255,.85); background: rgba(255,255,255,.1); border-radius: 999px; font-size: 10px; letter-spacing: 0; }
.part-list { display: grid; gap: 0 12px; max-height: 420px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.part-list::-webkit-scrollbar { width: 6px; }
.part-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 999px; }
.part-list div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.part-list div:first-child { border-top: 0; }
.part-list strong { color: #f08a82; white-space: nowrap; }

.application-panel { min-height: 560px; padding: 44px; }
.panel-poster { width: fit-content; max-width: 100%; margin: 24px auto; overflow: hidden; border-radius: var(--radius-lg); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .3); }
.panel-poster img { display: block; width: auto; max-width: 100%; height: auto; }
.contest-summary { margin: 0 0 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.75; text-align: left; }
.contest-summary p { margin: 0 0 14px; }
.contest-summary p:last-child { margin-bottom: 0; }
.contest-summary h1, .contest-summary h2, .contest-summary h3, .contest-summary h4 { margin: 24px 0 10px; color: var(--ink); font-size: 15px; font-weight: 800; }
.contest-summary ul, .contest-summary ol { margin: 0 0 14px; padding-left: 20px; }
.contest-summary li { margin: 4px 0; }
.contest-summary table { display: block; width: 100%; margin: 16px 0; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.contest-summary th, .contest-summary td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.contest-summary th { background: #f6f2ec; font-weight: 800; }
.contest-summary blockquote { margin: 14px 0; padding-left: 14px; border-left: 3px solid var(--line); color: var(--muted); }
.contest-summary img { max-width: 100%; height: auto; border-radius: 10px; }
.contest-summary a { color: var(--accent); text-decoration: underline; }
.application-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.application-heading > span { color: var(--muted); font-size: 12px; }
.application-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 28px; background: #ece7df; border-radius: 15px; }
.application-tabs button { padding: 13px 16px; color: #777069; background: transparent; border: 0; border-radius: 11px; font-weight: 800; cursor: pointer; }
.application-tabs button[aria-selected="true"] { color: var(--ink); background: white; box-shadow: 0 4px 14px rgba(30,25,20,.08); }

.application-form fieldset { min-width: 0; margin: 0 0 34px; padding: 0; border: 0; }
.application-form legend, .fieldset-heading legend { margin-bottom: 20px; font-size: 18px; font-weight: 900; letter-spacing: -.025em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; border: 0; }
.field-wide, .choice-field { grid-column: 1 / -1; }
.field > span, .field legend { color: #4f4a45; font-size: 12px; font-weight: 800; }
.field em { margin-left: 3px; color: var(--accent); font-style: normal; }
.field input:not([type="checkbox"]), .field select {
  width: 100%; height: 52px; padding: 0 15px; color: var(--ink); background: #faf8f4; border: 1px solid #d8d1c7; border-radius: 13px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field select:focus { background: white; border-color: #8e8982; box-shadow: 0 0 0 4px rgba(23,22,20,.06); }
.field input::placeholder { color: #b0a8a0; }
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-list label { position: relative; cursor: pointer; }
.choice-list input { position: absolute; opacity: 0; }
.choice-list span { display: block; padding: 10px 14px; color: #655f59; background: #f5f1eb; border: 1px solid #ddd5ca; border-radius: 999px; font-size: 12px; font-weight: 700; }
.choice-list input:checked + span { color: white; background: var(--ink); border-color: var(--ink); }
.checkbox-field, .agreement { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-field input, .agreement input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.upload-field > small { color: #9a9289; font-size: 11px; }
.upload-drop { min-height: 82px; padding: 18px; display: flex; align-items: center; gap: 12px; color: var(--ink); background: #faf8f4; border: 1px dashed #cfc6ba; border-radius: 15px; cursor: pointer; transition: border-color .2s, background .2s; }
.upload-drop:hover { background: white; border-color: var(--accent); }
.upload-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.upload-drop strong { padding: 9px 12px; color: white; background: var(--ink); border-radius: 9px; font-size: 11px; }
.upload-drop small { color: var(--muted); font-size: 11px; }
.upload-progress { --upload-progress: 0%; height: 4px; overflow: hidden; background: #e7e0d7; border-radius: 999px; }
.upload-progress span { display: block; width: var(--upload-progress); height: 100%; background: var(--accent); border-radius: inherit; transition: width .25s; }
.upload-field[data-upload-state="complete"] .upload-drop { border-color: #75a685; background: #f0f8f2; }
.upload-field[data-upload-state="error"] > small { color: #a93630; }
.agreement { margin: 30px 0 18px; color: #6d665f; font-size: 12px; line-height: 1.55; }
.submit-application, .admission-idle button {
  width: 100%; min-height: 58px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; color: white; background: var(--ink); border: 0; border-radius: 16px; font-weight: 900; cursor: pointer; transition: transform .2s, background .2s;
}
.submit-application:hover, .admission-idle button:hover { transform: translateY(-2px); background: var(--accent); }
.submit-application:disabled { opacity: .45; cursor: wait; transform: none; }

.participants-fieldset { margin-top: 40px !important; }
.fieldset-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.fieldset-heading legend { margin: 0; }
.fieldset-heading button, .participant-heading button { color: var(--accent); background: transparent; border: 0; font-size: 12px; font-weight: 900; cursor: pointer; }
.participant-list { display: grid; gap: 14px; }
.participant-card { padding: 24px; background: #f7f4ef; border: 1px solid #ded7ce; border-radius: 20px; }
.participant-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.participant-heading h3 { margin: 0; font-size: 14px; }
.participant-heading h3 span { margin-left: 5px; color: var(--accent); font-family: Georgia, serif; }
.participant-card:only-child [data-remove-participant] { display: none; }
.group-import-tools { margin-bottom: 18px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #eeebe5; border: 1px solid #ddd6cd; border-radius: 17px; }
.group-import-tools strong { display: block; margin-bottom: 5px; font-size: 13px; }
.group-import-tools p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.group-import-actions { flex: none; display: flex; gap: 8px; }
.group-import-actions a, .group-import-actions label { padding: 11px 13px; color: var(--ink); background: white; border: 1px solid #d6cec4; border-radius: 11px; text-decoration: none; font-size: 11px; font-weight: 900; cursor: pointer; }
.group-import-actions label { color: white; background: var(--ink); border-color: var(--ink); }
.group-import-actions input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.admission-card, .login-required, .application-unavailable { min-height: 470px; display: grid; place-items: center; text-align: center; }
.admission-card > div, .login-required { width: min(520px, 100%); margin: auto; }
.admission-card p:not(.section-kicker), .login-required > p:not(.section-kicker), .application-unavailable > p:not(.section-kicker) { margin: 18px auto 28px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-required { min-height: 470px; }
.login-required .lock-mark { width: 54px; height: 54px; margin: 0 auto 28px; display: grid; place-items: center; color: white; background: var(--accent); border-radius: 50%; font-size: 21px; }
.login-required a, .application-unavailable a { display: inline-flex; padding: 16px 24px; color: white; background: var(--ink); border-radius: 14px; text-decoration: none; font-weight: 900; }
.application-unavailable { width: min(520px, 100%); margin: auto; }
.unavailable-mark { width: 58px; height: 58px; margin: 0 auto 28px; display: grid; place-items: center; color: var(--accent); background: #f8e8e5; border: 1px solid #edcbc6; border-radius: 50%; font-size: 23px; font-weight: 900; }
.queue-pulse { position: relative; width: 92px; height: 92px; margin: 0 auto 28px; display: grid; place-items: center; border: 1px solid #dfd7cd; border-radius: 50%; }
.queue-pulse::before, .queue-pulse::after, .queue-pulse span { content: ""; position: absolute; border-radius: 50%; }
.queue-pulse::before { width: 70px; height: 70px; background: rgba(189,37,29,.08); animation: pulse 2s infinite; }
.queue-pulse::after { width: 12px; height: 12px; background: var(--accent); }
.admission-queued h2 strong { color: var(--accent); font-family: Georgia, serif; font-size: 1.25em; }
.queue-track { height: 5px; overflow: hidden; background: #e7e0d7; border-radius: 999px; }
.queue-track span { display: block; width: 28%; height: 100%; background: var(--accent); border-radius: inherit; animation: queue-slide 1.6s ease-in-out infinite alternate; }
@keyframes pulse { 0%,100% { transform: scale(.8); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }
@keyframes queue-slide { from { transform: translateX(-70%); } to { transform: translateX(330%); } }

.application-feedback { margin-top: 18px; padding: 16px 18px; color: #2e6a43; background: #eaf6ee; border: 1px solid #c8e4d1; border-radius: 14px; font-size: 13px; line-height: 1.6; }
.application-feedback.is-error { color: #9b2f29; background: #fff0ee; border-color: #efcbc7; }
.application-feedback.is-pending { color: #695c2a; background: #fff9e4; border-color: #eadfae; }
.payment-panel { margin-top: 22px; padding: 28px; color: white; background: linear-gradient(145deg, #17191c, #272a30); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; box-shadow: 0 18px 42px rgba(20,20,20,.16); }
.payment-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 14px; }
.payment-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.payment-heading > strong { color: #f28a82; font-family: Georgia, serif; font-size: 28px; white-space: nowrap; }
.payment-panel > p { margin: 0 0 22px; color: rgba(255,255,255,.58); font-size: 13px; line-height: 1.7; }
.payment-method { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 14px; margin-bottom: 12px; }
.payment-method > span { color: rgba(255,255,255,.64); font-size: 12px; font-weight: 800; }
.payment-method select { width: 100%; height: 50px; padding: 0 14px; color: white; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 13px; outline: none; }
.payment-method select:focus { border-color: rgba(255,255,255,.5); box-shadow: 0 0 0 4px rgba(255,255,255,.07); }
.payment-panel [data-payment-start] { width: 100%; min-height: 56px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); background: white; border: 0; border-radius: 14px; font-weight: 900; cursor: pointer; }
.payment-panel [data-payment-start]:hover { background: #f5dedb; }
.payment-panel [data-payment-start]:disabled { opacity: .55; cursor: wait; }
.payment-panel [data-payment-status] { min-height: 18px; display: block; margin-top: 13px; color: rgba(255,255,255,.6); font-size: 12px; line-height: 1.5; }
.payment-panel[data-payment-state="error"] [data-payment-status] { color: #ffaaa4; }
.payment-panel[data-payment-state="complete"] { background: linear-gradient(145deg, #173224, #244a35); }
.payment-panel[data-payment-state="complete"] [data-payment-status] { color: #b9eac9; }
.contest-footer { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 46px; display: flex; justify-content: space-between; color: #8b837a; border-top: 1px solid var(--line); }
.contest-footer span { color: var(--ink); font-weight: 900; letter-spacing: .16em; }

@media (max-width: 980px) {
  .contest-hero { grid-template-columns: 1fr; gap: 34px; padding: 48px; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero-facts > div { border-bottom: 0; border-top: 1px solid rgba(255,255,255,.13); }
  .contest-workspace { grid-template-columns: 1fr; }
  .contest-guide { position: static; }
  .guide-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .guide-steps li { display: block; }
  .part-summary { display: none; }
}
@media (max-width: 680px) {
  .contest-site-header, .contest-page, .contest-footer { width: min(100% - 24px, 1480px); }
  .contest-site-header { height: 70px; }
  .contest-site-header nav a:first-child { display: none; }
  .contest-hero { min-height: 430px; padding: 32px 24px; border-radius: 24px; }
  .hero-meta { margin-bottom: 26px; }
  .hero-copy h1 { font-size: 38px; }
  .hero-facts { grid-template-columns: 1fr; gap: 0; }
  .hero-facts > div { padding: 13px 0; }
  .contest-workspace { padding-top: 14px; }
  .contest-guide { padding: 28px 22px; border-radius: 24px; }
  .guide-steps { grid-template-columns: 1fr; }
  .application-panel { min-height: 480px; padding: 30px 20px; border-radius: 24px; }
  .application-heading { display: block; }
  .application-heading > span { display: block; margin-top: 10px; }
  .form-grid, .participant-grid { grid-template-columns: 1fr; }
  .participant-card { padding: 20px 16px; }
  .group-import-tools { align-items: stretch; flex-direction: column; }
  .group-import-actions { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
  .payment-panel { padding: 24px 18px; }
  .payment-heading { align-items: flex-start; flex-direction: column; }
  .payment-method { grid-template-columns: 1fr; gap: 8px; }
  .contest-footer { display: block; }
  .contest-footer small { display: block; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
