[hidden]{display:none!important}
.school-cheer-modal {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: grid;
  place-items: center;
  padding: 18px;
}
.school-cheer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(4, 5, 20, .82); backdrop-filter: blur(10px); cursor: default; }
.school-cheer-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 550px);
  max-height: min(820px, calc(100dvh - 36px));
  padding: 28px 27px 23px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 2px solid #171524;
  border-radius: 4px;
  color: var(--paper-ink);
  background:
    repeating-linear-gradient(180deg, transparent 0, transparent 31px, rgba(78,104,155,.07) 32px, transparent 33px),
    var(--paper-warm);
  box-shadow: 7px 8px 0 #8066bf, 0 30px 90px rgba(2,4,18,.58);
  animation: school-sheet-in 360ms cubic-bezier(.22,.9,.28,1) both;
}
.school-cheer-sheet::before { content: ''; position: absolute; top: -8px; left: 13%; width: 85px; height: 22px; background: rgba(199, 238, 103, .78); transform: rotate(-4deg); }
@keyframes school-sheet-in { from { opacity: 0; transform: translateY(20px) scale(.985); } to { opacity: 1; transform: none; } }

.school-cheer-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.school-cheer-sheet-head span { display: block; color: #7350b4; font-family: var(--font-hand); font-size: 16px; font-weight: 700; }
.school-cheer-sheet-head h2 { margin: 3px 0 0; font-family: var(--font-hand); font-size: 30px; line-height: 1.15; }
.school-cheer-close { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid rgba(36,31,50,.18); border-radius: 50%; background: rgba(36,31,50,.05); color: #2a2438; font: 26px/1 inherit; cursor: pointer; }

.school-current-flag {
  margin-top: 23px;
  padding: 18px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 13px 15px;
  border: 1px solid rgba(80, 105, 42, .23);
  background: #eaf4df;
  box-shadow: 4px 5px 0 rgba(103,132,61,.16);
}
.school-current-flag.flag-planted { animation: planted-flag 520ms cubic-bezier(.2,.85,.3,1) both; }
@keyframes planted-flag { 0% { opacity: .2; transform: translateY(-14px) rotate(-2deg); } 60% { transform: translateY(3px) rotate(1deg); } 100% { opacity: 1; transform: none; } }
.school-current-flag-visual { position: relative; min-height: 58px; display: grid; place-items: center; border-radius: 2px; background: rgba(255,255,255,.55); }
.school-current-flag-visual .school-flag-mark { color: #5d4d76; transform: scale(1.35); }
.school-current-flag-visual b { position: absolute; right: -5px; bottom: -6px; font-size: 19px; transform: rotate(10deg); }
.school-current-flag small { display: block; color: rgba(36,31,50,.5); font-size: 12px; }
.school-current-flag strong { display: block; margin-top: 2px; font-family: var(--font-hand); font-size: 22px; line-height: 1.2; }
.school-current-flag p { margin: 4px 0 0; color: rgba(36,31,50,.56); font-size: 13px; }
.school-current-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.school-current-actions button { min-height: 44px; padding: 7px 9px; border: 1px solid rgba(66,52,91,.2); border-radius: 8px; background: rgba(255,255,255,.6); color: #392f4c; font: inherit; font-size: 14px; font-weight: 760; cursor: pointer; }
.school-current-actions .school-flag-cancel { grid-column: 1 / -1; min-height: 44px; border: 0; background: transparent; color: rgba(36,31,50,.48); font-size: 12px; text-decoration: underline; }

.school-search-flow { margin-top: 23px; }
.school-search-form > label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 820; }
.school-search-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.school-search-form input { min-width: 0; min-height: 49px; padding: 0 14px; border: 1.5px solid rgba(65,52,89,.28); border-radius: 10px; outline: none; background: rgba(255,255,255,.72); color: var(--paper-ink); font: inherit; font-size: 16px; }
.school-search-form input:focus { border-color: #7654b1; box-shadow: 0 0 0 3px rgba(118,84,177,.12); }
.school-search-form button { min-width: 70px; border: 1px solid #342945; border-radius: 10px; background: #342945; color: #fff; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.school-search-form > small { display: block; margin-top: 6px; color: rgba(36,31,50,.47); font-size: 12px; }

.school-search-results { max-height: 250px; margin-top: 12px; overflow-y: auto; border-top: 1px dashed rgba(58,49,76,.2); }
.school-search-result { width: 100%; min-height: 55px; padding: 10px 6px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; border: 0; border-bottom: 1px dashed rgba(58,49,76,.16); background: transparent; color: var(--paper-ink); text-align: left; cursor: pointer; }
.school-search-result:hover, .school-search-result:focus-visible { background: rgba(185,156,255,.1); outline: none; }
.school-search-result strong { display: block; font-size: 14px; }
.school-search-result small { display: block; margin-top: 2px; color: rgba(36,31,50,.48); font-size: 12px; }
.school-search-result span { color: #6f4dad; font-size: 14px; font-weight: 800; }
.school-search-empty { margin: 15px 0 0; color: rgba(36,31,50,.55); font-size: 14px; text-align: center; }

.school-selected-card { position: relative; margin-top: 14px; padding: 13px 53px 13px 13px; display: grid; grid-template-columns: 39px minmax(0,1fr); align-items: center; gap: 11px; border: 1.5px solid rgba(87,117,44,.35); background: #f1f8e8; }
.school-selected-card .school-flag-mark { color: #5a4a72; }
.school-selected-card small { display: block; color: rgba(36,31,50,.48); font-size: 12px; }
.school-selected-card strong { display: block; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.school-selected-card p { margin: 2px 0 0; color: rgba(36,31,50,.5); font-size: 12px; }
.school-selected-card > button { position: absolute; top: 50%; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(36,31,50,.07); color: #3b314c; font: 19px/1 inherit; transform: translateY(-50%); cursor: pointer; }

.school-aggregate-consent { margin-top: 13px; padding: 12px; display: grid; grid-template-columns: auto 1fr; gap: 8px; border: 1px dashed rgba(58,49,76,.2); background: rgba(255,255,255,.42); cursor: pointer; }
.school-aggregate-consent input { width: 17px; height: 17px; margin-top: 1px; accent-color: #6b4aa4; }
.school-aggregate-consent span { color: rgba(36,31,50,.66); font-size: 13px; line-height: 1.5; }
.school-aggregate-consent a {
  min-width: 44px;
  min-height: 44px;
  margin: -12px -4px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #69479f;
  text-underline-offset: 2px;
  vertical-align: middle;
}
.school-aggregate-consent strong { color: #5a3b88; }

.school-plant-button { width: 100%; margin-top: 13px; }
.school-plant-button:disabled { cursor: not-allowed; filter: grayscale(.55); opacity: .48; box-shadow: none; }
.school-cheer-status { min-height: 21px; margin: 13px 0 0; color: #69479f; font-size: 14px; font-weight: 700; line-height: 1.5; text-align: center; }
.school-cheer-status.is-error { color: #a13d53; }
.school-data-source { margin: 13px 0 0; color: rgba(36,31,50,.42); font-size: 12px; text-align: center; }
.school-data-source a {
  min-height: 44px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  color: inherit;
}

.school-aggregate-consent a:focus-visible,
.school-data-source a:focus-visible {
  border-radius: 5px;
  outline: 2px solid #69479f;
  outline-offset: 2px;
}

@media (max-width: 740px) {
  .school-cheer-section {
    width: calc(100% - 28px);
    margin: 78px auto 88px;
    padding: 36px 17px 25px;
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .school-cheer-copy h2 { font-size: 35px; }
  .school-cheer-copy > p:not(.story-kicker, .school-cheer-total) { font-size: 16px; }
  .school-cheer-primary { width: 100%; }
  .school-ranking-paper { min-height: 365px; padding: 29px 17px 19px; transform: rotate(.25deg); }
  .school-ranking-paper h3 { font-size: 25px; }
  .school-ranking-list li { grid-template-columns: 28px minmax(0,1fr) auto; gap: 7px; }
  .school-ranking-list .school-rank-name strong { font-size: 14px; }

  .school-cheer-modal { padding: 0; place-items: end center; }
  .school-cheer-sheet {
    width: 100%;
    max-height: min(90dvh, 820px);
    padding: 27px 15px max(20px, env(safe-area-inset-bottom));
    border-width: 2px 0 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -22px 80px rgba(2,4,18,.55);
    animation-name: school-sheet-mobile-in;
  }
  @keyframes school-sheet-mobile-in { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
  .school-cheer-sheet::before { left: 15%; }
  .school-cheer-sheet-head h2 { font-size: 28px; }
  .school-cheer-close { width: 44px; height: 44px; }
  .school-current-flag { padding: 15px; }
  .school-current-actions button,
  .school-current-actions .school-flag-cancel,
  .school-my-flag button { min-height: 44px; }
  .school-selected-card { padding-right: 53px; }
  .school-selected-card > button { right: 4px; width: 44px; height: 44px; }
  .school-search-results { max-height: 210px; }
}

@media (max-width: 380px) {
  .school-cheer-copy h2 { font-size: 32px; }
  .school-ranking-paper { padding-right: 14px; padding-left: 14px; }
  .school-cheer-sheet-head h2 { font-size: 25px; }
  .school-current-actions { grid-template-columns: 1fr; }
  .school-current-actions .school-flag-cancel { grid-column: auto; }
}

/* 결과 공유 · 처음 화면 복귀 · 모바일 메모 안정화 */
.memo-copy { display: block; }



.school-cheer-section {
  position: relative;
  width: min(calc(100% - 32px), 1040px);
  margin: 98px auto 108px;
  padding: clamp(28px, 5vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(330px, 1.15fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 163, 255, 0.23);
  border-radius: 4px;
  background:
    radial-gradient(circle at 14% 18%, rgba(189, 158, 255, 0.16), transparent 28%),
    radial-gradient(circle at 86% 86%, rgba(206, 255, 89, 0.08), transparent 24%),
    #11152f;
  box-shadow: 0 28px 72px rgba(1, 3, 16, 0.34), 7px 8px 0 rgba(111, 86, 168, 0.2);
  isolation: isolate;
  scroll-margin-top: 76px;
}

.school-cheer-section::before,
.school-cheer-section::after {
  content: '✦';
  position: absolute;
  z-index: -1;
  color: rgba(220, 207, 255, 0.26);
  font-size: 28px;
}

.school-cheer-section::before { top: 23px; right: 36%; transform: rotate(12deg); }
.school-cheer-section::after { bottom: 23px; left: 42%; font-size: 17px; }

.school-cheer-copy .story-kicker { color: #c5b1ff; }

.school-cheer-copy h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-hand);
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.school-cheer-copy h2 span {
  color: var(--lucky-lime);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  text-decoration-color: rgba(206, 255, 89, 0.42);
}

.school-cheer-copy > p:not(.story-kicker, .school-cheer-total) {
  max-width: 390px;
  margin: 22px 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.72;
}

.school-cheer-primary,
.school-plant-button {
  min-height: 56px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid #171524;
  border-radius: 16px;
  background: var(--lucky-lime);
  color: #171524;
  box-shadow: 5px 6px 0 #7861b5;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.school-cheer-primary:hover,
.school-plant-button:not(:disabled):hover {
  transform: translate(-1px, -2px);
  box-shadow: 7px 8px 0 #7861b5;
  filter: brightness(1.03);
}

.school-cheer-primary:active,
.school-plant-button:not(:disabled):active { transform: translate(1px, 1px); }
.school-cheer-primary .school-flag-mark,
.school-plant-button .school-flag-mark { color: #262236; }
.school-cheer-primary .school-flag-mark::after,
.school-plant-button .school-flag-mark::after { background: #9e7fea; filter: none; }

.school-cheer-total {
  min-height: 20px;
  margin: 17px 0 0;
  color: #d6caff;
  font-family: var(--font-hand);
  font-size: 16px;
}

.school-my-flag {
  margin-top: 18px;
  padding: 12px 13px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px dashed rgba(206, 255, 89, 0.38);
  background: rgba(206, 255, 89, 0.06);
}

.school-my-flag > span { font-size: 22px; }
.school-my-flag p { min-width: 0; margin: 0; }
.school-my-flag small { display: block; color: rgba(255,255,255,.5); font-size: 12px; }
.school-my-flag strong { display: block; overflow: hidden; color: #fff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.school-my-flag button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(206,255,89,.4);
  border-radius: 999px;
  background: transparent;
  color: #e6ffc2;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.school-ranking-paper {
  position: relative;
  min-height: 390px;
  padding: 32px 28px 23px;
  color: var(--paper-ink);
  background:
    repeating-linear-gradient(180deg, transparent 0, transparent 31px, rgba(78,104,155,.09) 32px, transparent 33px),
    var(--paper-warm);
  box-shadow: 8px 11px 0 rgba(122, 96, 180, 0.52), 0 22px 50px rgba(0,0,0,.24);
  transform: rotate(.5deg);
}

.ranking-tape {
  position: absolute;
  top: -12px;
  width: 78px;
  height: 24px;
  opacity: .86;
}
.ranking-tape-left { left: 11%; background: var(--tape-pink); transform: rotate(-4deg); }
.ranking-tape-right { right: 12%; background: var(--tape-yellow); transform: rotate(4deg); }

.school-ranking-paper > header {
  padding-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 2px solid rgba(38,32,54,.13);
}
.school-ranking-paper header small { display: block; color: #7857b2; font-size: 12px; font-weight: 850; letter-spacing: .13em; }
.school-ranking-paper h3 { margin: 4px 0 0; font-family: var(--font-hand); font-size: 28px; line-height: 1.15; }
.school-ranking-paper header > span { font-size: 27px; transform: rotate(10deg); }

.school-ranking-list { margin: 10px 0 0; padding: 0; list-style: none; }
.school-ranking-list li {
  min-height: 47px;
  padding: 8px 2px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px dashed rgba(58,49,76,.17);
}
.school-ranking-list li.school-ranking-loading { grid-template-columns: 1fr; color: rgba(36,31,50,.56); font-size: 14px; }
.school-ranking-list .school-rank-number { color: #7756ae; font-family: var(--font-hand); font-size: 18px; font-weight: 700; }
.school-ranking-list .school-rank-name { min-width: 0; }
.school-ranking-list .school-rank-name strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.school-ranking-list .school-rank-name small { display: block; color: rgba(36,31,50,.48); font-size: 12px; }
.school-ranking-list .school-rank-count { color: #55772c; font-size: 13px; font-weight: 850; white-space: nowrap; }

.school-ranking-empty { min-height: 230px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-flag-illustration { position: relative; width: 62px; height: 73px; margin-bottom: 5px; border-left: 4px solid #5d4d76; transform: rotate(-4deg); }
.empty-flag-illustration::before { content: ''; position: absolute; top: 5px; left: 0; width: 55px; height: 35px; background: #cfff69; clip-path: polygon(0 0, 100% 8%, 78% 50%, 100% 92%, 0 100%); }
.empty-flag-illustration::after { content: '🍀'; position: absolute; top: 10px; left: 16px; font-size: 20px; }
.school-ranking-empty strong { font-family: var(--font-hand); font-size: 20px; }
.school-ranking-empty p { margin: 5px 0 0; color: rgba(36,31,50,.55); font-size: 14px; }
.school-ranking-note { margin: 16px 0 0; color: rgba(36,31,50,.5); font-size: 12px; line-height: 1.5; text-align: center; }

.screen4-school-cheer {
  min-height: 45px;
  margin: 10px auto 2px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(205, 255, 99, .43);
  border-radius: 999px;
  background: rgba(205, 255, 99, .08);
  color: #e7ffc0;
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}
.screen4-school-cheer:hover { background: rgba(205,255,99,.15); transform: translateY(-1px); }
.screen4-school-cheer .school-flag-mark { width: 22px; height: 24px; color: #dfff9e; transform: scale(.78); }

/* Production-only controls use the reference's existing spacing and palette. */
:root{--paper-ink:#302b43;--paper-warm:#f8f5ee;--font-hand:'Gowun Batang',serif}
.production-field{display:block;margin:0 28px 18px;color:#b9c9df;font-size:13px}
.production-field input{display:block;width:100%;min-height:44px;margin-top:8px;border:1px solid #495b71;border-radius:10px;padding:10px 12px;background:#12243a;color:#edf3fb;font:inherit;font-size:16px}
.production-field small{display:block;margin-top:7px;line-height:1.6;color:#adbed1}
.production-field>span{color:#8296b1;margin-left:5px}
.birth-card>select{width:100%;min-height:48px;border:1px solid #cec6db;border-radius:10px;background:#fff;padding:10px 12px;font:inherit}
#payment-form .check-row{align-items:flex-start;font-size:14px;line-height:1.7;margin:14px 0}
#payment-form .check-row input{flex-shrink:0;margin-top:4px;min-width:18px;width:18px;height:18px}
#payment-form a,.seal-consent a{text-decoration:underline;text-underline-offset:3px}
.minor-agreements{border-top:1px solid #d3c9de;padding-top:8px}
.capsule-card-actions,.locker-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px;margin-top:22px}
.capsule-card-actions .button{font-size:13px;padding:10px 16px;min-height:44px}
.capsule-card .text-link{font-size:13px}.capsule-card p{overflow-wrap:anywhere}
.locker-tools{justify-content:flex-start}.locker-heading p{max-width:570px}
.locker-tools button,.checkout-product button{font:inherit}
.button:disabled{opacity:.5;cursor:not-allowed}
.school-cheer-section{margin:0}
.school-cheer-section .school-cheer-copy h2{color:#f6f5ed}
.school-cheer-sheet .school-data-source{font-size:12px}
.school-cheer-sheet input{color:#302b43}
.saju-year-note h4{font-size:16px}.saju-year-note p{line-height:1.85}
.saju-overview .saju-elements{flex-wrap:wrap}
.seal-consent small{line-height:1.7}
@media(max-width:680px){.production-field{margin:0 17px 18px}.school-cheer-section{grid-template-columns:1fr;padding:28px 18px}.school-cheer-copy h2{font-size:32px}.school-ranking-paper{min-width:0;padding:25px 15px}.school-cheer-section .school-cheer-copy>p{font-size:15px}.school-cheer-modal{padding:12px}.school-cheer-sheet{padding:23px 18px;max-height:calc(100dvh - 24px)}.locker-tools{align-items:stretch;flex-direction:column}.locker-tools .button{width:100%}.capsule-card-actions .button{width:auto}.header{gap:12px}.header nav a{white-space:nowrap}}
/* Additional legal links must wrap within narrow reference footers. */
@media(max-width:700px){.decorate-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.decorate-tabs button{min-width:0;white-space:nowrap}}
#app>footer{gap:20px;flex-wrap:wrap}
#app>footer>div{min-width:0;max-width:100%;display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
#app>footer>div>span{flex-basis:100%;white-space:normal}
@media(max-width:620px){#app>footer>div{justify-content:center;line-height:1.8}#app>footer>div>span{text-align:center}}

/* Keep supporting notes compact without changing the reference page widths. */
.fortune-seasons{padding-block:58px}
.fortune-seasons>header{margin-bottom:24px}
.fortune-season-panel{min-height:0}
.fortune-report-return>span{margin-left:auto}
.fortune-input-v2 .birth-card>.field-hint{margin-bottom:22px}
@media(max-width:800px){
  .fortune-seasons{padding-block:36px}
  .fortune-seasons>header{margin-bottom:20px}
  .fortune-season-tabs button{min-height:96px;padding:14px 10px}
  .fortune-season-panel{min-height:0;padding:22px}
  .fortune-keep-actions>#share-fortune-result{grid-column:1/-1}
  .fortune-keep-actions>.button{min-width:0}
  .fortune-report-return>span{margin-left:0}
}
