/* ============================================================
   Odin Planner — Upload Modal (내 자료 올리기)
   합격생 자료 등록: 자소서·면접·합격 수기 3-step 폼
   ============================================================ */

.up-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(42, 31, 31, .5);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  animation: up-fade .22s ease-out;
}
.up-overlay.is-open { display: flex; }
@keyframes up-fade { from { opacity: 0; } }

.up-modal {
  position: relative;
  width: 100%;
  max-width: 980px;
  height: calc(100vh - 48px);
  max-height: 760px;
  background: var(--cream, #FFF9F4);
  border: 1px solid var(--line, #ECDFD5);
  border-radius: 28px;
  display: grid;
  grid-template-columns: 380px 1fr;
  grid-template-rows: 1fr;
  overflow: hidden;
  box-shadow:
    0 50px 100px -36px rgba(196, 95, 98, 0.32),
    0 24px 50px -28px rgba(42, 31, 31, 0.3);
  animation: up-in .3s cubic-bezier(.22,.61,.36,1);
}
@keyframes up-in {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
}

body.has-modal { overflow: hidden; }

/* ===== LEFT — preview rail ===== */
.up-side {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(255, 184, 176, 0.6), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(255, 218, 211, 0.4), transparent 65%),
    var(--paper-2, #F5EDE6);
  padding: 38px 32px;
  border-right: 1px solid var(--line, #ECDFD5);
  display: flex; flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  min-height: 0;        /* grid item이 자식보다 작아질 수 있게 */
}
.up-side__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .6);
  color: var(--coral-deep, #C45F62);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  width: max-content;
}
.up-side__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral, #F08A8E);
}
.up-side__title {
  font-family: var(--serif, "Fraunces", serif);
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -.012em;
  margin: 14px 0 0;
  font-weight: 500;
  color: var(--ink, #2A1F1F);
}
.up-side__title em { font-style: italic; color: var(--coral-deep, #C45F62); font-weight: 400; }

/* live preview card */
.up-preview {
  background: #fff;
  border: 1px solid var(--line, #ECDFD5);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 22px -16px rgba(196, 95, 98, .3);
}
.up-preview__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.up-preview__badge {
  background: #DDEAFB; color: #3D6299;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.up-preview__badge[data-type="면접 질문"] { background: #E2EBDD; color: #4B6841; }
.up-preview__badge[data-type="합격 수기"] { background: var(--coral-mist, #FFEAE5); color: var(--coral-deep, #C45F62); }
.up-preview__tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: .12em;
  color: var(--mute, #8A7878); text-transform: uppercase;
}
.up-preview__school {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; color: var(--mute, #8A7878);
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.up-preview__title {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink, #2A1F1F);
  letter-spacing: -.01em;
  margin: 0 0 8px;
}
.up-preview__excerpt {
  font-size: 12.5px;
  line-height: 1.55;
  color: #4A3A3A;
  font-family: var(--serif, "Fraunces", serif);
  font-style: italic;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.up-preview__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--line, #ECDFD5);
}
.up-preview__author { display: flex; align-items: center; gap: 8px; }
.up-preview__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB8B0, #F08A8E);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif, "Fraunces", serif); font-weight: 500;
  font-size: 14px;
}
.up-preview__name {
  font-size: 12.5px; font-weight: 600; color: var(--ink, #2A1F1F);
  display: inline-flex; align-items: center; gap: 6px;
}
.up-preview__verified {
  background: #E2EBDD; color: #4B6841;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px; font-weight: 700;
}
.up-preview__meta {
  font-size: 10.5px; color: var(--mute, #8A7878);
  margin-top: 1px;
}
.up-preview__price {
  font-family: var(--serif, "Fraunces", serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--coral-deep, #C45F62);
}
.up-preview__price.is-free { color: #4B6841; font-style: italic; }

.up-side__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 12.5px; color: #4A3A3A;
  line-height: 1.5;
}
.up-side__list li { display: flex; gap: 10px; align-items: flex-start; }
.up-side__list .ico {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  color: var(--coral-deep, #C45F62);
  display: grid; place-items: center;
  font-family: var(--serif, "Fraunces", serif);
  font-style: italic;
  font-size: 12px;
  font-weight: 600;
  margin-top: 1px;
}
.up-side__list b { color: var(--coral-deep, #C45F62); font-weight: 700; }
.up-side__note {
  margin: auto 0 0;
  font-size: 11px;
  color: var(--mute, #8A7878);
  line-height: 1.55;
  padding-top: 16px;
  border-top: 1px solid var(--line, #ECDFD5);
}

/* ===== RIGHT — form ===== */
.up-body {
  position: relative;
  padding: 38px 40px 0;
  overflow-y: auto;
  display: flex; flex-direction: column;
  min-height: 0;        /* grid item이 자식보다 작아질 수 있게 */
}
.up-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border: 0; background: transparent;
  border-radius: 50%;
  font-size: 16px;
  color: var(--mute, #8A7878);
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.up-close:hover { background: var(--coral-mist, #FFEAE5); color: var(--coral-deep, #C45F62); transform: rotate(90deg); }

.up-head { margin-bottom: 16px; }
.up-step {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--coral-deep, #C45F62);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.up-title {
  font-family: var(--serif, "Fraunces", serif);
  font-size: 28px;
  line-height: 1.16;
  letter-spacing: -.012em;
  margin: 0 0 10px;
  font-weight: 500;
  color: var(--ink, #2A1F1F);
}
.up-title em { font-style: italic; color: var(--coral-deep, #C45F62); font-weight: 400; }
.up-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mute, #8A7878);
}

/* progress bar */
.up-progress {
  height: 4px;
  background: var(--paper-2, #F5EDE6);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0 22px;
}
.up-progress__bar {
  display: block;
  height: 100%;
  width: 33%;
  background: var(--coral-grad, linear-gradient(135deg, #FFB8B0, #F08A8E, #E07478));
  border-radius: 999px;
  transition: width .35s cubic-bezier(.22,.61,.36,1);
}

/* form panels */
.up-form { display: flex; flex-direction: column; flex: 1; }
.up-step-panel { display: none; flex-direction: column; gap: 16px; }
.up-step-panel.is-on { display: flex; animation: up-slide .3s ease; }
@keyframes up-slide { from { opacity: 0; transform: translateX(8px); } }

/* type cards */
.up-types {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.up-type input { position: absolute; opacity: 0; pointer-events: none; }
.up-type__inner {
  background: #fff;
  border: 1.5px solid var(--line, #ECDFD5);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.up-type__inner:hover {
  border-color: var(--coral, #F08A8E);
  transform: translateY(-2px);
}
.up-type input:checked + .up-type__inner {
  border-color: var(--coral, #F08A8E);
  background: var(--coral-mist, #FFEAE5);
  box-shadow: 0 6px 16px -8px rgba(196, 95, 98, .35);
}
.up-type__ico { font-size: 26px; line-height: 1; }
.up-type__inner b {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink, #2A1F1F);
}
.up-type__inner small {
  font-size: 11px;
  color: var(--mute, #8A7878);
  line-height: 1.4;
  font-weight: 500;
}

/* grid */
.up-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* fields */
.up-field {
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.up-field > span {
  font-size: 12px;
  font-weight: 700;
  color: #4A3A3A;
  display: flex; justify-content: space-between; align-items: baseline;
}
.up-field > span em { color: var(--coral-deep, #C45F62); font-style: normal; }
.up-field input,
.up-field select,
.up-field textarea {
  background: #fff;
  border: 1.5px solid var(--line, #ECDFD5);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--ink, #2A1F1F);
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.up-field textarea { min-height: 120px; line-height: 1.6; }
.up-field input::placeholder, .up-field textarea::placeholder { color: #B5A5A2; }
.up-field input:focus, .up-field textarea:focus, .up-field select:focus {
  border-color: var(--coral, #F08A8E);
  box-shadow: 0 0 0 4px var(--coral-mist, #FFEAE5);
}
.up-counter {
  position: absolute;
  right: 10px; bottom: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: #B5A5A2;
  pointer-events: none;
}

/* file dropzone */
.up-drop {
  border: 1.5px dashed #DCCCC0;
  border-radius: 14px;
  padding: 18px;
  background: var(--paper-2, #F5EDE6);
  transition: border-color .15s, background .15s;
}
.up-drop.is-drag {
  border-color: var(--coral, #F08A8E);
  background: var(--coral-mist, #FFEAE5);
}
.up-drop__inner { display: flex; align-items: center; gap: 14px; }
.up-drop__ico {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.up-drop__inner > div { flex: 1; min-width: 0; }
.up-drop__inner b {
  display: block;
  font-size: 13.5px;
  color: var(--ink, #2A1F1F);
  margin-bottom: 2px;
}
.up-drop__inner small {
  font-size: 11.5px;
  color: var(--mute, #8A7878);
  font-weight: 500;
}
.up-drop__btn {
  background: var(--ink, #2A1F1F);
  color: var(--cream, #FFF9F4);
  border: 0;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.up-drop__btn:hover { background: #4A3A3A; }
.up-files {
  list-style: none; padding: 12px 0 0; margin: 12px 0 0;
  border-top: 1px dashed #DCCCC0;
  display: flex; flex-direction: column; gap: 6px;
}
.up-files li {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
  color: #4A3A3A;
}
.up-files li .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-files li .size {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--mute, #8A7878);
}
.up-files li .rm {
  border: 0; background: transparent;
  color: var(--mute, #8A7878);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.up-files li .rm:hover { background: var(--coral-mist, #FFEAE5); color: var(--coral-deep, #C45F62); }

/* price tabs */
.up-price-tabs {
  display: flex;
  background: var(--paper-2, #F5EDE6);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.up-price-tabs button {
  flex: 1;
  border: 0; background: transparent;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mute, #8A7878);
  cursor: pointer;
  font-family: inherit;
}
.up-price-tabs button.is-on {
  background: var(--cream, #FFF9F4);
  color: var(--coral-deep, #C45F62);
  box-shadow: 0 4px 10px -4px rgba(196, 95, 98, .25);
}

.up-price-card {
  background: #fff;
  border: 1.5px solid var(--line, #ECDFD5);
  border-radius: 16px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.up-field--inline { flex-direction: row; align-items: center; }
.up-field--inline > span { flex-shrink: 0; min-width: 90px; }
.up-price-input {
  display: inline-flex; align-items: center;
  background: var(--paper-2, #F5EDE6);
  border-radius: 12px;
  padding: 0 16px;
  flex: 1;
}
.up-price-input .cur {
  font-family: var(--serif, "Fraunces", serif);
  font-style: italic;
  font-size: 18px;
  color: var(--coral-deep, #C45F62);
  margin-right: 4px;
}
.up-price-input input {
  background: transparent; border: 0;
  padding: 11px 0;
  font-family: var(--serif, "Fraunces", serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink, #2A1F1F);
  width: 100%;
  outline: none;
  -moz-appearance: textfield;
}
.up-price-input input::-webkit-outer-spin-button,
.up-price-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.up-price-suggest {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.up-price-suggest button {
  border: 1px solid var(--line, #ECDFD5);
  background: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #4A3A3A;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .02em;
}
.up-price-suggest button:hover { border-color: var(--coral, #F08A8E); color: var(--coral-deep, #C45F62); }
.up-price-suggest button.is-on {
  border-color: var(--coral, #F08A8E);
  background: var(--coral-mist, #FFEAE5);
  color: var(--coral-deep, #C45F62);
}

.up-payout {
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px dashed var(--line, #ECDFD5);
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px;
}
.up-payout > div {
  display: flex; justify-content: space-between;
  color: #4A3A3A;
}
.up-payout dt { font-weight: 500; }
.up-payout dd { margin: 0; font-family: "JetBrains Mono", monospace; font-weight: 600; }
.up-payout .sum {
  padding-top: 8px;
  border-top: 1px solid var(--line, #ECDFD5);
  margin-top: 2px;
  font-size: 15px;
}
.up-payout .sum dt { font-weight: 700; color: var(--ink); }
.up-payout .sum dd {
  font-family: var(--serif, "Fraunces", serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--coral-deep, #C45F62);
}

.up-free-card {
  background: #F0F6EC;
  border: 1.5px solid #C6D9B6;
  border-radius: 16px;
  padding: 22px;
  text-align: center;
}
.up-free-card .up-free__ico { font-size: 28px; display: block; margin-bottom: 8px; }
.up-free-card h4 {
  margin: 0 0 6px;
  font-family: var(--serif, "Fraunces", serif);
  font-weight: 500;
  font-size: 18px;
  color: #3F5A33;
}
.up-free-card p {
  margin: 0;
  font-size: 13px;
  color: #5E7651;
  line-height: 1.6;
}

/* terms */
.up-terms {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.up-check {
  display: flex; align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #4A3A3A;
  line-height: 1.55;
  cursor: pointer;
}
.up-check input {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid #DCCCC0;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background .15s, border-color .15s;
}
.up-check input:checked {
  background: var(--coral, #F08A8E);
  border-color: var(--coral, #F08A8E);
}
.up-check .box { display: none; }
.up-check input:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.up-check b { font-weight: 700; color: var(--ink, #2A1F1F); }
.up-check a { color: var(--coral-deep, #C45F62); font-weight: 600; }

/* foot nav — 항상 모달 하단에 고정 */
.up-foot {
  position: sticky;
  bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 16px 0 22px;
  background: linear-gradient(to top, var(--cream, #FFF9F4) 65%, rgba(255, 249, 244, 0.92) 100%);
  border-top: 1px solid var(--line, #ECDFD5);
  z-index: 5;
}
.up-back {
  background: transparent;
  border: 0;
  color: var(--mute, #8A7878);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  transition: color .15s;
}
.up-back:hover:not(:disabled) { color: var(--coral-deep, #C45F62); }
.up-back:disabled { opacity: .35; cursor: not-allowed; }
.up-next, .up-submit {
  padding: 11px 22px !important;
  font-size: 13.5px !important;
}
.up-submit {
  background: var(--ink, #2A1F1F) !important;
  color: var(--cream, #FFF9F4) !important;
  box-shadow: 0 12px 28px -10px rgba(42, 31, 31, .35) !important;
}
.up-submit:hover { background: #4A3A3A !important; }

/* responsive */
@media (max-width: 880px) {
  .up-modal {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: calc(100vh - 32px);
    max-height: none;
  }
  .up-side {
    padding: 28px 24px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;      /* 모바일에선 상단부니 스크롤 X */
    max-height: 40vh;       /* 미리보기 너무 차지하지 않게 */
  }
  .up-side__list, .up-side__note { display: none; }
  .up-body { padding: 28px 24px 0; }
  .up-foot { padding: 14px 0 18px; }
}
@media (max-width: 560px) {
  .up-types { grid-template-columns: 1fr; }
  .up-grid { grid-template-columns: 1fr; }
  .up-title { font-size: 22px; }
  .up-overlay { padding: 12px; }
  .up-modal { border-radius: 22px; }
}
