/* ==========================================================================
   명리서원 命理書院 · Contemporary Eastern Luxury
   Tokens → base → layout → sections → motion → responsive
   ========================================================================== */

:root {
  /* Brand colour roles */
  --ground: #F3EFE7;      /* off-white, the page */
  --ground-2: #E9E3D7;    /* one tone step down */
  --ink: #1C1B19;         /* charcoal, all running text */
  --ink-2: #232220;       /* charcoal field */
  --ink-soft: #6B665E;    /* secondary notes only */
  --paper: #ECE6DA;       /* text on charcoal */
  --paper-soft: rgba(236, 230, 218, 0.72);
  --bronze: #9A7A4F;      /* the accent: the action, and one other thing */
  --bronze-deep: #7E6240;
  --bronze-deeper: #66503A;
  --bronze-light: #C4A574;

  /* Type */
  --serif: 'Noto Serif KR', 'Apple SD Gothic Neo', 'Nanum Myeongjo', serif;
  --sans: 'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

  /* Rhythm */
  --gutter: clamp(20px, 3vw, 48px);
  --section: clamp(120px, 14vw, 220px);
  --nav-h: 76px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-feature-settings: 'tnum' 1;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
button, input { font: inherit; color: inherit; }

::selection { background: var(--bronze); color: #fff; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }

.wrap {
  width: 100%;
  max-width: 1520px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(40px, 6vw, 112px);
}
.align-start { align-items: start; }
.align-center { align-items: center; }

/* --------------------------------------------------------------------------
   Type roles
   -------------------------------------------------------------------------- */

h1, h2 {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
h1 { font-size: clamp(28px, 3.6vw, 52px); }
h2 { font-size: clamp(30px, 3.6vw, 54px); max-width: 17em; }
h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(21px, 1.7vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.statement {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  max-width: 21em;
}
.lede {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.75;
  max-width: 36em;
  margin-top: 28px;
}
.body { max-width: 34em; }
.note {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 34em;
}

/* Display Hanja: the one very large size */
.char-hanja, .mark-hanja, .p-hanja, .e-hanja, .c-hanja, .dm-pillar, .f-name {
  font-family: var(--serif);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
}

/* --------------------------------------------------------------------------
   Buttons · flat, square, one fill
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 17px 30px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn-bronze { background: var(--bronze-deep); color: #fff; }
.btn-bronze:hover { background: var(--bronze-deeper); }
.btn-light { background: var(--ground); color: var(--ink); }
.btn-light:hover { background: #fff; }

/* --------------------------------------------------------------------------
   Navigation · wordmark, four links, one action
   -------------------------------------------------------------------------- */

.nav {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
  padding-inline: var(--gutter);
  background: var(--ground);
}
.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  justify-self: start;
}
.brand-hanja {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.06em;
}
.brand-ko {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-top: 3px;
  padding-left: 2px;
}
.nav-links {
  display: flex;
  gap: 40px;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { justify-self: end; padding: 13px 22px; font-size: 15px; }

/* --------------------------------------------------------------------------
   Hero & admission · full-bleed clip, two characters at the corners
   -------------------------------------------------------------------------- */

.hero, .admission {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--paper);
  background: var(--ink-2);
  overflow: hidden;
}
.admission { min-height: 92svh; }

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero .hero-video { animation: drift 28s var(--ease) infinite alternate; }

/* the one permitted gradient: a neutral scrim under text on a picture */
.scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(20, 19, 18, 0.28) 0%, rgba(20, 19, 18, 0) 32%), /* taste-skill-ignore: neutral scrim */
    linear-gradient(to top, rgba(20, 19, 18, 0.62) 0%, rgba(20, 19, 18, 0) 48%); /* taste-skill-ignore: neutral scrim */
}

.char-pair {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(24px, 4vh, 56px) var(--gutter) 0;
}
.char { display: flex; flex-direction: column; }
.char:last-child { text-align: right; align-items: flex-end; }
.char-hanja {
  font-size: clamp(120px, 22vw, 380px);
  line-height: 0.95;
  color: var(--paper);
}
.char-label {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--paper-soft);
}

.hero-foot {
  text-align: center;
  padding: 0 var(--gutter) clamp(40px, 8vh, 96px);
  max-width: 760px;
  margin-inline: auto;
}
.hero-foot h1, .hero-foot h2 {
  color: var(--paper);
  margin-inline: auto;
  text-wrap: balance;
}
.hero-foot p {
  margin: 18px auto 32px;
  font-size: clamp(16px, 1.2vw, 18px);
  color: var(--paper);
  max-width: 30em;
}

/* --------------------------------------------------------------------------
   02 · Philosophy
   -------------------------------------------------------------------------- */

.philosophy {
  padding: var(--section) 0 calc(var(--section) * 0.7);
  background: var(--ground);
}
.phil-text .body { margin-top: 40px; }
.phil-media {
  justify-self: end;
  width: min(100%, 420px);
}
.phil-media video {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--ground-2);
}
.phil-media figcaption {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.section-mark {
  padding: calc(var(--section) * 0.7) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.mark-hanja {
  font-size: clamp(96px, 15vw, 240px);
  letter-spacing: 0.04em;
}
.mark-label {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   03 · Four pillars · charcoal field
   -------------------------------------------------------------------------- */

.pillars {
  background: var(--ink-2);
  color: var(--paper);
  padding-bottom: var(--section);
}
.pillars-media img,
.pillars-media video {
  width: 100%;
  height: clamp(320px, 62vh, 760px);
  object-fit: cover;
}
.pillars .wrap { padding-top: var(--section); }
.pillars h2 { color: var(--paper); }
.pillars .lede { color: var(--paper); }

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
  margin-top: clamp(72px, 9vw, 140px);
}
.p-hanja {
  font-size: clamp(88px, 10vw, 168px);
  color: var(--paper);
}
.p-name {
  display: block;
  margin-top: 22px;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--bronze-light);
}
.pillar-grid p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--paper-soft);
  max-width: 18em;
}

/* --------------------------------------------------------------------------
   04 · Day master · the live thing
   -------------------------------------------------------------------------- */

.daymaster {
  padding: var(--section) 0;
  background: var(--ground);
}
.daymaster .grid-2 { grid-template-columns: 1fr 1fr; }
.dm-text .body { margin-top: 28px; }

.dm-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 40px;
}
.dm-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.dm-field input {
  width: 7.5em;
  padding: 14px 16px;
  background: var(--ground-2);
  border: 0;
  border-radius: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.dm-field input::-webkit-outer-spin-button,
.dm-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dm-field:first-child input { width: 6.5em; }
.dm-field:nth-child(2) input, .dm-field:nth-child(3) input { width: 4.4em; }
.dm-form .btn { padding: 18px 28px; }
.dm-text .note { margin-top: 24px; }

.dm-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(40px, 5vw, 80px) var(--gutter);
  background: var(--ground-2);
  min-height: 100%;
  justify-content: center;
}
.dm-pillar {
  font-size: clamp(140px, 16vw, 300px);
  letter-spacing: 0.02em;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.dm-result.is-updating .dm-pillar { opacity: 0; transform: translateY(14px); }
.dm-reading {
  display: block;
  margin-top: 24px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 1.7vw, 26px);
}
.dm-desc {
  margin-top: 10px;
  font-size: 17px;
  max-width: 24em;
}
.dm-desc.is-error { color: var(--bronze-deep); }

/* --------------------------------------------------------------------------
   05 · Five elements · the bronze field
   -------------------------------------------------------------------------- */

.elements {
  padding: var(--section) 0 calc(var(--section) * 0.9);
  background: var(--bronze);
  color: #0F0E0D;
}
.elements h2 { color: #0F0E0D; }
.elements .lede { color: #0F0E0D; }

.element-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(8px, 2vw, 32px);
  margin-top: clamp(64px, 8vw, 128px);
  padding-inline: var(--gutter);
}
.element-row li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.e-hanja {
  font-size: clamp(56px, 15vw, 268px);
  color: var(--ground);
}
.e-name {
  display: block;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.e-trait {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #0F0E0D;
}

/* --------------------------------------------------------------------------
   06 · Course · editorial list beside one picture
   -------------------------------------------------------------------------- */

.course {
  padding: var(--section) 0;
  background: var(--ground-2);
}
.course-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 112px);
  margin-top: clamp(64px, 7vw, 112px);
  align-items: start;
}
.course-media { position: sticky; top: 48px; }
.course-media img,
.course-media video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--ground);
}
.course-list { display: flex; flex-direction: column; gap: clamp(48px, 5vw, 80px); }
.course-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.c-hanja {
  font-size: clamp(60px, 6.4vw, 104px);
  color: var(--bronze);
  min-width: 1.1em;
}
.c-meta {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}
.c-text > p:last-child {
  margin-top: 16px;
  max-width: 30em;
}

/* --------------------------------------------------------------------------
   07 · Method · charcoal field, one moving picture
   -------------------------------------------------------------------------- */

.method {
  padding: var(--section) 0;
  background: var(--ink-2);
  color: var(--paper);
}
.method .grid-2 { grid-template-columns: 1fr 1.2fr; }
.method-media { width: min(100%, 460px); }
.method-media video {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #151413;
}
.method h2 { color: var(--paper); }
.method-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 56px;
}
.method-list h3 { color: var(--paper); }
.method-list p {
  margin-top: 10px;
  font-size: 17px;
  color: var(--paper-soft);
  max-width: 30em;
}

/* --------------------------------------------------------------------------
   Footer · the name returns at full width
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ground);
  padding: calc(var(--section) * 0.8) 0 48px;
}
.f-name {
  font-size: clamp(72px, 17vw, 330px);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.f-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-top: clamp(48px, 6vw, 96px);
  align-items: end;
}
.f-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 15px;
  font-weight: 500;
}
.f-links a:hover { color: var(--bronze); }
.f-address {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.f-address a { color: var(--ink); }
.f-copy {
  font-size: 15px;
  color: var(--ink-soft);
  text-align: right;
}

/* --------------------------------------------------------------------------
   Motion · transform and opacity only
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease),
    transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes drift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.09); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero .hero-video { animation: none; }
  .btn, .nav-links a::after, .dm-pillar { transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive · the phone is its own composition
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .grid-2, .daymaster .grid-2, .method .grid-2 { grid-template-columns: 1fr; }
  .phil-media { justify-self: start; }
  .section-mark { align-items: flex-start; text-align: left; }
  .course-body { grid-template-columns: 1fr; }
  .course-media { position: static; max-width: 640px; }
  .dm-result { min-height: 0; }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  body { font-size: 16px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .brand-hanja { font-size: 19px; }

  .char-hanja { font-size: clamp(104px, 30vw, 160px); }
  .char-label { font-size: 12px; }
  .hero-foot { padding-bottom: 40px; }

  .pillar-grid { grid-template-columns: 1fr; gap: 44px; }
  .pillar-grid li { display: grid; grid-template-columns: auto 1fr; column-gap: 22px; align-items: start; }
  .p-hanja { font-size: 84px; grid-row: 1 / 3; min-width: 1.1em; }
  .p-name { margin-top: 10px; }
  .pillar-grid p { margin-top: 6px; }

  .element-row { gap: 6px; }
  .e-hanja { font-size: 15.5vw; }
  .e-name { font-size: 12px; margin-top: 12px; }
  .e-trait { display: none; }

  .course-item { grid-template-columns: 1fr; gap: 10px; }
  .c-hanja { font-size: 64px; }

  .f-grid { grid-template-columns: 1fr; gap: 28px; }
  .f-copy { text-align: left; }
  .dm-form .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Fixed apply bar · the hero button, stretched edge to edge and pinned
   -------------------------------------------------------------------------- */

:root { --bar-h: 49px; }

body.has-bar { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); }

.apply-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bronze-deep);
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background-color 0.25s var(--ease);
}
.apply-bar:hover { background: var(--bronze-deeper); }
.apply-bar:active { background: var(--bronze); }
.has-bar .hero-foot { padding-bottom: calc(clamp(40px, 8vh, 96px) + var(--bar-h)); }

/* --------------------------------------------------------------------------
   About · the closing introduction
   -------------------------------------------------------------------------- */

.about {
  padding: var(--section) 0;
  background: var(--ground-2);
}
.about .grid-2 { grid-template-columns: 1fr 1.4fr; }
.about-text { display: flex; flex-direction: column; gap: 22px; max-width: 36em; }
.about-text p { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.8; }

/* --------------------------------------------------------------------------
   Apply page · questionnaire
   -------------------------------------------------------------------------- */

.apply-head {
  max-width: 880px;
  margin-inline: auto;
  padding: calc(var(--section) * 0.45) var(--gutter) 0;
}
.apply-head h1 { font-size: clamp(34px, 4vw, 60px); }
.apply-head .lede { margin-top: 24px; }
.apply-form {
  max-width: 880px;
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding-inline: var(--gutter);
  padding-bottom: var(--section);
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 80px);
}
.apply-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.apply-form legend {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  padding: 0;
}
.field { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.field:last-child { margin-bottom: 0; }
.field-label { font-size: 15px; font-weight: 500; }
.field-label small { font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.field .control {
  width: 100%;
  padding: 16px 18px;
  background: var(--ground-2);
  border: 0;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.field select.control {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 5l5 5 5-5' fill='none' stroke='%231C1B19' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}
.field textarea.control { min-height: 128px; resize: vertical; }
.field .control::placeholder { color: var(--ink-soft); }
.field .control:disabled { opacity: 0.45; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.choice span {
  display: inline-block;
  padding: 14px 24px;
  background: var(--ground-2);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.choice input:checked + span { background: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--bronze); outline-offset: 3px; }
.inline-check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-soft); cursor: pointer; }
.inline-check input, .consent-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--bronze-deep); flex: none; }
.field-error { display: none; font-size: 14px; color: var(--bronze-deep); }
.field.is-invalid .field-error { display: block; }
.field.is-invalid .control, .field.is-invalid .choice span { box-shadow: inset 0 0 0 2px var(--bronze-deep); } /* taste-skill-ignore: form-field error state */

.consent-box { background: var(--ground-2); padding: 22px 24px; margin-bottom: 20px; }
.consent-box summary { cursor: pointer; font-weight: 500; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.consent-box summary::-webkit-details-marker { display: none; }
.consent-box summary::after { content: "펼치기"; font-size: 13px; color: var(--ink-soft); }
.consent-box[open] summary::after { content: "접기"; }
.consent-box dl { margin: 18px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 15px; line-height: 1.6; }
.consent-box dt { color: var(--ink-soft); }
.consent-box dd { margin: 0; }
.consent-check { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.6; cursor: pointer; }
.consent-check input { margin-top: 4px; }
.consent-check strong { font-weight: 500; }

.pay {
  background: var(--ink-2);
  color: var(--paper);
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pay-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.pay-summary span { font-size: 17px; }
.pay-summary strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.pay-summary small { display: block; font-size: 15px; color: var(--paper-soft); margin-top: 4px; }
.btn-block { display: block; width: 100%; text-align: center; padding: 20px; font-size: 16px; }
.btn-block:disabled { opacity: 0.6; cursor: default; transform: none; }

.complete {
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: calc(var(--section) * 0.5) 0;
}
.complete .wrap { max-width: 880px; }
.complete .mark-hanja { font-size: clamp(120px, 18vw, 300px); }
.complete .mark-label { display: block; margin-top: 14px; font-size: 13px; letter-spacing: 0.06em; color: var(--ink-soft); }
.complete h1 { margin-top: 32px; }
.complete .lede { margin-top: 20px; }
.complete .btn { margin-top: 40px; }

@media (max-width: 760px) {
  .about .grid-2 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .consent-box dl { grid-template-columns: 1fr; gap: 4px; }
  .consent-box dt { margin-top: 10px; }
  .pay-summary { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Netlify's free-plan badge is injected as a fixed iframe; lift it above the apply bar */
.has-bar #nl-badge-frame { bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom, 0px)) !important; }

/* --------------------------------------------------------------------------
   Revision 3 · 학습사주 copy: hero note, FAQ, footer business info, legal page
   -------------------------------------------------------------------------- */

.hero-foot .hero-lead { margin-bottom: 14px; }
.hero-foot .hero-note { margin: 0 auto; font-size: 15px; color: var(--paper-soft); }

.faq { padding: var(--section) 0; background: var(--ground); }
.faq-list { max-width: 880px; margin-top: clamp(40px, 5vw, 64px); display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--ground-2); padding: 22px 26px; }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 22px; line-height: 1; color: var(--ink-soft); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 14px; max-width: 34em; }

.f-grid { grid-template-columns: 1fr 2fr; align-items: start; }
.f-links { flex-direction: column; gap: 10px; }
.f-biz { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; font-size: 15px; line-height: 1.6; }
.f-biz div { display: flex; gap: 10px; min-width: 0; }
.f-biz dt { color: var(--ink-soft); flex: none; }
.f-biz dd { margin: 0; }
.f-copy { grid-column: 1 / -1; text-align: left; margin-top: 16px; line-height: 1.7; }

.field-hint { font-size: 14px; color: var(--ink-soft); }
.pay-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: 15px; color: var(--paper-soft); }
.pay-items li { padding-left: 14px; text-indent: -14px; }
.pay-items li::before { content: "· "; }

.legal { max-width: 880px; margin: clamp(48px, 6vw, 80px) auto 0; padding: 0 var(--gutter) var(--section); display: flex; flex-direction: column; gap: clamp(48px, 6vw, 72px); }
.legal h2 { font-size: clamp(24px, 2.4vw, 32px); max-width: none; }
.legal p, .legal li { margin-top: 14px; max-width: 36em; }
.legal ul { display: flex; flex-direction: column; gap: 0; }

@media (max-width: 760px) {
  .f-grid { grid-template-columns: 1fr; }
  .f-links { flex-direction: row; flex-wrap: wrap; }
  .f-biz { grid-template-columns: 1fr; }
  .pay-items { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Revision 4 · reviews board, counsellor letter, closing section, compact steps on phones
   -------------------------------------------------------------------------- */

.reviews { padding: var(--section) 0; background: var(--ground); }
.review-board { margin-top: clamp(40px, 5vw, 64px); display: flex; flex-direction: column; gap: 8px; }
.review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 48px;
  align-items: end;
  background: var(--ground-2);
  padding: 30px 34px;
}
.review-quote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1.6;
  letter-spacing: -0.01em;
  max-width: 30em;
}
.review-meta { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 15px; color: var(--ink-soft); white-space: nowrap; }
.review-meta span + span::before { content: "·"; margin: 0 10px; }
.review-foot { margin-top: 20px; font-size: 15px; color: var(--ink-soft); }

.admission { min-height: 72svh; justify-content: center; }
.has-bar .admission .hero-foot { padding-top: 48px; padding-bottom: calc(48px + var(--bar-h)); }

.about-mark { display: flex; flex-direction: column; }
.about-mark .mark-hanja { font-size: clamp(120px, 13vw, 200px); }
.about-mark .mark-label { margin-top: 14px; font-size: 13px; letter-spacing: 0.06em; color: var(--ink-soft); }
.about-sign { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.about-sign strong { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 1.6vw, 24px); }
.about-sign span { font-size: 15px; color: var(--ink-soft); }

@media (max-width: 760px) {
  .review { grid-template-columns: 1fr; gap: 14px; padding: 24px 22px; }
  .review-meta { white-space: normal; }

  /* 진행 과정: 한 화면에 들어오도록 영상은 숨기고 2열로 압축 */
  .method { padding: 48px 0; }
  .method-media { display: none; }
  .method h2 { font-size: 26px; }
  .method-list { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
  .method-list h3 { font-size: 17px; }
  .method-list p { font-size: 14px; margin-top: 6px; line-height: 1.6; }

  .admission { min-height: 64svh; }
  .about-mark .mark-hanja { font-size: 104px; }
}

/* closing section: text now sits mid-frame over the bright fog, so use a flat neutral scrim */
.admission .scrim { background: rgba(20, 19, 18, 0.42); }

/* --------------------------------------------------------------------------
   Revision 5 · letter column, report strip, sub-page header, date row
   -------------------------------------------------------------------------- */

.about { padding: clamp(72px, 9vw, 128px) 0; }
.letter { max-width: 640px; }
.letter-label { font-size: 13px; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 28px; }
.letter p + p { margin-top: 20px; }
.letter p:not(.letter-label):not(.about-sign) {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.9;
  letter-spacing: -0.005em;
}
.letter .about-sign { margin-top: 36px; }

.nav-sub { grid-template-columns: auto 1fr; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; padding: 8px 0; }
.back-link svg { flex: none; transition: transform 0.25s var(--ease); }
.back-link:hover svg { transform: translateX(-3px); }
.nav-sub .brand { justify-self: end; align-items: flex-end; text-align: right; }
.nav-sub .brand-ko { padding-left: 0; padding-right: 2px; }

.date-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.15fr; gap: 10px; }
.date-row .control { padding-left: 14px; padding-right: 34px; background-position: right 12px center; }

@media (max-width: 1100px) {
  .course-body { grid-template-columns: 1fr; }
  .course-list {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding: 4px var(--gutter) 8px;
    margin-inline: calc(-1 * var(--gutter));
    cursor: grab;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .course-list::-webkit-scrollbar { display: none; }
  .course-list.is-dragging { cursor: grabbing; scroll-behavior: auto; }
  .course-list.is-dragging * { user-select: none; }
  .course-item {
    flex: 0 0 min(76vw, 320px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: var(--ground);
    padding: 26px 24px 28px;
    min-height: 100%;
  }
  .c-hanja { font-size: 56px; min-width: 0; }
  .c-text > p:last-child { margin-top: 10px; font-size: 15px; line-height: 1.7; }
}

@media (max-width: 760px) {
  .nav-sub { grid-template-columns: auto 1fr; }
  .date-row { grid-template-columns: 1.25fr 1fr 1fr 1.2fr; gap: 6px; }
  .date-row .control { padding-left: 10px; padding-right: 26px; font-size: 16px; background-position: right 8px center; }
  .about { padding: 64px 0; }
  .letter p + p { margin-top: 16px; }
}

/* --------------------------------------------------------------------------
   Revision 6 · 2px corners everywhere, numbered steps, compact footer, centred closing text
   -------------------------------------------------------------------------- */

:root { --radius: 2px; }
.btn, .btn-block, .control, .choice span, .review, .faq details, .consent-box, .pay,
.dm-result, .dm-field input, .phil-media video, .course-media video, .method-media video,
.course-item { border-radius: var(--radius); }
.field.is-invalid .control, .field.is-invalid .choice span { border-radius: var(--radius); }

/* 진행 과정: 번호가 붙은 간결한 목록 */
.steps-list { margin-top: clamp(32px, 4vw, 48px); display: flex; flex-direction: column; gap: clamp(22px, 2.6vw, 34px); }
.steps-list li { display: grid; grid-template-columns: 3.2em 1fr; gap: 0 12px; align-items: baseline; }
.step-no {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 1.6vw, 24px);
  letter-spacing: 0.06em;
  color: var(--bronze-light);
  font-variant-numeric: tabular-nums;
}
.steps-list h3 { font-size: clamp(19px, 1.5vw, 22px); color: var(--paper); }
.steps-list p { margin-top: 6px; font-size: 15px; line-height: 1.65; color: var(--paper-soft); max-width: 28em; }

/* 기와집 영상: 문구를 영상 정중앙에 */
.admission { justify-content: center; }
.admission .hero-foot, .has-bar .admission .hero-foot { padding: 48px var(--gutter); }

/* 푸터: 작게, 촘촘하게, 한눈에 */
.footer { padding: clamp(56px, 7vw, 96px) 0 28px; }
.f-name { font-size: clamp(56px, 11vw, 200px); }
.f-links { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px 22px; margin-top: clamp(24px, 3.5vw, 40px); font-size: 13px; font-weight: 500; }
.f-biz { margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); }
.f-biz span { white-space: nowrap; }
.f-biz span + span::before { content: "·"; margin: 0 9px; }
.f-biz b { font-weight: 400; color: var(--ink); }
.f-copy { margin-top: 14px; font-size: 12px; line-height: 1.6; color: var(--ink-soft); text-align: left; }

@media (max-width: 760px) {
  .steps-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; margin-top: 22px; }
  .steps-list li { display: block; }
  .step-no { display: block; font-size: 18px; margin-bottom: 6px; }
  .steps-list h3 { font-size: 17px; }
  .steps-list p { font-size: 13.5px; margin-top: 4px; }
  .footer { padding: 48px 0 24px; }
  .f-links { gap: 6px 16px; font-size: 12.5px; }
  .f-biz { flex-direction: column; gap: 3px; }
  .f-biz span { white-space: normal; }
  .f-biz span + span::before { content: none; margin: 0; }
}
.field .control, .field select.control, .field textarea.control { border-radius: var(--radius); }

/* --------------------------------------------------------------------------
   Revision 7 · no top header on the home page, "to top" button
   -------------------------------------------------------------------------- */

.no-nav .hero { min-height: 100svh; }
.no-nav .hero .char-pair { padding-top: clamp(40px, 6vh, 72px); }

.to-top {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom, 0px));
  z-index: 49;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), background-color 0.2s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--bronze-deep); }
body:not(.has-bar) .to-top { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }

/* Netlify 배지는 왼쪽 아래로 보내 버튼과 겹치지 않게 */
#nl-badge-frame { left: 12px !important; right: auto !important; }
.has-bar #nl-badge-frame { bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom, 0px)) !important; }

@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* --------------------------------------------------------------------------
   Revision 8 · small wordmark over the hero video (top-left)
   -------------------------------------------------------------------------- */

.hero-brand {
  position: absolute;
  top: clamp(18px, 3vh, 28px);
  left: var(--gutter);
  z-index: 2;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: var(--paper);
}
.hero-brand .brand-hanja { font-family: var(--serif); font-weight: 400; font-size: 18px; letter-spacing: 0.08em; color: var(--paper); }
.hero-brand .brand-ko { font-size: 10.5px; letter-spacing: 0.22em; color: var(--paper-soft); margin-top: 3px; padding-left: 2px; }
.no-nav .hero .char-pair { padding-top: clamp(80px, 11vh, 120px); }
@media (max-width: 760px) {
  .hero-brand .brand-hanja { font-size: 16px; }
  .no-nav .hero .char-pair { padding-top: 76px; }
}

/* --------------------------------------------------------------------------
   Revision 9 · hero without the giant characters; centred bold wordmark
   -------------------------------------------------------------------------- */

.no-nav .hero { justify-content: flex-end; }
.hero-brand {
  top: clamp(28px, 5vh, 56px);
  left: 0;
  right: 0;
  width: max-content;
  margin-inline: auto;
  align-items: center;
  text-align: center;
}
.hero-brand .brand-hanja {
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: 0.14em;
  padding-left: 0.14em; /* 자간만큼 왼쪽을 보정해 시각적으로 가운데 */
}
.hero-brand .brand-ko {
  font-size: 11px;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  margin-top: 8px;
  color: var(--paper-soft);
}
@media (max-width: 760px) {
  .hero-brand { top: 28px; }
  .hero-brand .brand-hanja { font-size: 22px; }
}

/* --------------------------------------------------------------------------
   Revision 10 · report preview sheets, price row, price on the apply bar
   -------------------------------------------------------------------------- */

/* 보조 텍스트를 한 단계 진하게: --ground-2 위에서도 4.5:1을 넘도록 (4.46 → 4.73) */
:root { --ink-soft: #67625A; --sheet: #FBF9F5; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 리포트 미리보기 · 종이 두 장. 글자 크기는 종이 폭에 비례(cqi)해서 어느 화면에서도 같은 지면으로 보인다 */
.report-preview { min-width: 0; } /* 그리드 칸이 가로 스크롤 내용만큼 늘어나지 않게 */
.report-preview .sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet {
  container-type: inline-size;
  aspect-ratio: 1 / 1.414;
  background: var(--sheet);
  border-radius: var(--radius);
  overflow: hidden;
}
.sheet-in {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 8cqi 7.5cqi 7cqi;
  font-size: max(10.5px, 4.2cqi);
  line-height: 1.6;
  color: var(--ink);
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 2.8cqi;
  font-family: var(--serif);
  font-weight: 400;
  font-size: max(13px, 6cqi);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.sheet-mark { font-weight: 200; font-size: 1.7em; line-height: 1; color: var(--bronze); }

.chart {
  width: calc(100% + 3.2cqi);
  margin: 5cqi -1.6cqi 0;
  border-collapse: separate;
  border-spacing: 1.6cqi;
  table-layout: fixed;
}
.chart th {
  padding: 0;
  font-weight: 400;
  font-size: max(9.5px, 3.3cqi);
  color: var(--ink-soft);
  text-align: center;
}
.chart td {
  padding: 1.8cqi 0 1.6cqi;
  background: var(--ground);
  border-radius: var(--radius);
  text-align: center;
}
.chart td.is-day { background: var(--ink-2); color: var(--paper); }
.chart .ch { display: block; font-family: var(--serif); font-weight: 300; font-size: 9.5cqi; line-height: 1.05; }
.chart .el { display: block; margin-top: 0.8cqi; font-size: max(9.5px, 3.1cqi); color: var(--ink-soft); }
.chart td.is-day .el { color: var(--paper-soft); }
.day-note { margin-top: 1.4cqi; font-size: max(9.5px, 3.3cqi); color: var(--ink-soft); }
.day-note b { font-family: var(--serif); font-weight: 400; color: var(--ink); }

.balance { margin-top: 4.5cqi; display: grid; gap: 1.1cqi; }
.balance li { display: grid; grid-template-columns: 5.5cqi 1fr 4.8em; align-items: center; gap: 3cqi; }
.b-name { font-family: var(--serif); font-size: max(11px, 4.4cqi); line-height: 1.2; }
.b-bar { position: relative; height: 2.2cqi; background: var(--ground-2); border-radius: 1px; overflow: hidden; }
.b-bar::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--n) * 20%);
  background: var(--bronze);
}
.b-count { font-size: max(9.5px, 3.1cqi); color: var(--ink-soft); text-align: right; }

.sheet-text { margin-top: auto; padding-top: 3.5cqi; font-size: max(10.5px, 3.9cqi); line-height: 1.6; }

.talk-label { margin-top: 6cqi; font-size: max(9.5px, 3.3cqi); letter-spacing: 0.04em; color: var(--ink-soft); }
.talk { margin-top: 2.2cqi; display: grid; gap: 1.6cqi; }
.talk li {
  padding: 2.4cqi 3.4cqi;
  border-radius: var(--radius);
  font-family: var(--serif);
  font-weight: 400;
  font-size: max(11px, 4.2cqi);
  line-height: 1.5;
}
.talk-do li { background: var(--ground); }
.talk-dont li { padding-block: 0.6cqi; color: var(--ink-soft); }

.report-preview figcaption { margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

/* 고정 바에 가격을 함께 */
.apply-bar { gap: 14px; }
.apply-price { font-weight: 400; }

@media (max-width: 760px) {
  /* 종이 두 장은 손가락으로 넘기는 한 줄로 */
  .report-preview .sheets {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(80vw, 320px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding: 0 var(--gutter) 4px;
    margin-inline: calc(-1 * var(--gutter));
    scrollbar-width: none;
  }
  .report-preview .sheets::-webkit-scrollbar { display: none; }
  .sheet { scroll-snap-align: start; }
}

/* 결제 블록(차콜) 안의 안내문은 종이색 보조 톤으로: 회색 보조 텍스트는 어두운 바탕에서 2.8:1 */
.pay .note { color: var(--paper-soft); }

/* 데스크톱: 종이가 읽히는 크기가 되도록 미리보기 칸을 넓게 */
@media (min-width: 1101px) {
  .course-body { grid-template-columns: 1.2fr 1fr; }
}

/* --------------------------------------------------------------------------
   Revision 11 · shorter page: five-elements section removed, sundial clip at half height
   -------------------------------------------------------------------------- */

.pillars-media img,
.pillars-media video { height: clamp(200px, 31vh, 380px); }

/* --------------------------------------------------------------------------
   Revision 12 · phone-only shortening: tighter section rhythm, no decorative
   mark, ink clip under the text, 2×2 four pillars
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  :root { --section: 72px; }

  .section-mark { display: none; }

  /* 철학: 글 아래에 먹 영상을 세로로 */
  .philosophy .grid-2 { gap: 44px; }
  .phil-media { width: min(76%, 420px); }
  .philosophy { padding-bottom: var(--section); }

  /* 時學力處: 진행 과정처럼 두 칸씩 */
  .pillar-grid { grid-template-columns: 1fr 1fr; gap: 36px 18px; margin-top: 48px; }
  .pillar-grid li { display: block; }
  .p-hanja { font-size: 64px; min-width: 0; }
  .p-name { margin-top: 14px; }
  .pillar-grid p { margin-top: 6px; font-size: 14px; line-height: 1.65; }
}


/* --------------------------------------------------------------------------
   Revision 14 · report contents as a short table of contents: chapter names
   only, so it no longer repeats 時學力處; the preview sheets carry the detail
   -------------------------------------------------------------------------- */

.course-media { position: static; }
.course-list.toc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-self: center;
  overflow: visible;
  scroll-snap-type: none;
  padding: 0;
  margin: 0;
  cursor: auto;
}
.course-list.toc .course-item {
  display: grid;
  grid-template-columns: 1.6em minmax(0, 1fr);
  align-items: baseline;
  gap: 0 18px;
  flex: none;
  min-height: 0;
  padding: clamp(10px, 1.2vw, 16px) 0;
  background: none;
  border-radius: 0;
}
.course-list.toc .c-hanja {
  min-width: 0;
  font-size: clamp(30px, 2.6vw, 42px);
  color: var(--bronze);
}
.course-list.toc h3 { font-size: clamp(18px, 1.5vw, 24px); }

@media (max-width: 1100px) {
  .course-list.toc { margin-top: 28px; }
}
@media (max-width: 760px) {
  .course-list.toc { grid-template-columns: 1fr 1fr; column-gap: 16px; margin-top: 24px; }
  .course-list.toc .course-item { gap: 0 10px; padding: 9px 0; }
  .course-list.toc .c-hanja { font-size: 26px; }
  .course-list.toc h3 { font-size: 16px; }
}

/* --------------------------------------------------------------------------
   Revision 12 · 자사몰: 결제 단계, 결제 결과, 주문 관리
   -------------------------------------------------------------------------- */

.link-back {
  display: inline-block;
  background: none;
  border: 0;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.link-back:hover { color: var(--bronze-deep); }

.pay-step { padding-bottom: var(--section); }
.pay-widget {
  max-width: 880px;
  margin: clamp(32px, 4vw, 48px) auto 0;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#payment-method, #agreement { border-radius: var(--radius); overflow: hidden; }
.pay-widget .btn-block { margin-top: 8px; }
.pay-widget .note { max-width: none; }
#pay-error:not([hidden]), #order-error:not([hidden]) { color: var(--bronze-deep); font-weight: 500; }

/* 주문 관리 */
.admin-title { font-size: 15px; font-weight: 500; }
.admin { max-width: 1120px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--gutter) var(--section); }
.admin-login { max-width: 520px; }
.admin-login h1 { font-size: clamp(28px, 3vw, 40px); }
.admin-login .lede { margin-top: 16px; }
.admin-login-form { display: flex; gap: 10px; margin-top: 28px; }
.admin-login-form .control { flex: 1; padding: 14px 16px; background: var(--ground-2); border: 0; border-radius: var(--radius); font-size: 16px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--ground-2); padding: 18px 20px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 13px; color: var(--ink-soft); }
.stat-value { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.admin-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.admin-tools .choice span { padding: 11px 16px; font-size: 14px; }
.admin-search { flex: 1; min-width: 220px; padding: 12px 16px; background: var(--ground-2); border: 0; border-radius: var(--radius); font-size: 15px; }
.order-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.order { background: var(--ground-2); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.order-pending { opacity: 0.8; }
.order-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: 14px; color: var(--ink-soft); }
.order-id { font-family: var(--serif); font-size: 18px; color: var(--ink); letter-spacing: 0.02em; }
.order-status { font-weight: 500; color: var(--bronze-deep); }
.order-paid .order-status { color: var(--ink); }
.order-amount { margin-left: auto; color: var(--ink); font-weight: 500; }
.order-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-size: 14.5px; line-height: 1.6; }
.order-facts div { display: flex; gap: 10px; min-width: 0; }
.order-facts dt { color: var(--ink-soft); flex: none; min-width: 5.5em; }
.order-facts dd { margin: 0; overflow-wrap: anywhere; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.order-actions .consent-check { font-size: 14px; }
.order-note { flex: 1; min-width: 240px; padding: 10px 14px; background: var(--ground); border: 0; border-radius: var(--radius); font-size: 14px; }

@media (max-width: 760px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .order-facts { grid-template-columns: 1fr; }
  .admin-login-form { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   Revision 13 · PC-only adjustments. The phone layout is untouched: every rule
   below sits in a min-width query, and the .pc-br line breaks are hidden on phones.
   -------------------------------------------------------------------------- */

.pc-br { display: none; }

@media (min-width: 761px) {
  .pc-br { display: inline; }

  /* 命理: 오른쪽 끝이 아니라, 문장이 시작하는 왼쪽 선에 맞춰 */
  .philosophy .section-mark {
    width: 100%;
    max-width: 1520px;
    margin-inline: auto;
    align-items: flex-start;
    text-align: left;
  }
  .philosophy .mark-hanja { margin-left: -0.05em; }

  /* 자주 묻는 질문: 후기 게시판과 같은 가로 폭 */
  .faq-list { max-width: none; }

  /* 바닥글 한자: 절반 크기로 */
  .f-name { font-size: clamp(48px, 6vw, 96px); }
}

@media (min-width: 1101px) {
  /* 철학 문장: 글 칸을 조금 넓히고 크기를 살짝 줄여 세 줄 · 두 줄로 고정 */
  .philosophy .grid-2 { grid-template-columns: 1.6fr 1fr; }
  .phil-text .statement { font-size: clamp(22px, 2.2vw, 32px); max-width: none; }
  .phil-text .body { max-width: none; }

  /* 상담사의 편지: 좁고 긴 한 단 대신, 제목과 서명이 가로로 걸친 두 단 */
  .about .letter {
    max-width: none;
    columns: 2;
    column-gap: clamp(56px, 6vw, 112px);
  }
  .letter p { break-inside: avoid; }
  .letter .letter-label + p { margin-top: 0; } /* 두 단의 첫 줄 높이를 맞춤 */
  .letter-label,
  .letter .about-sign { column-span: all; }
  .letter .about-sign { margin-top: 44px; align-items: flex-end; text-align: right; }
}

/* hidden 속성은 어떤 display 규칙보다 우선 */
[hidden] { display: none !important; }
