:root {
  --ink: #17352d;
  --muted: #5f6f69;
  --paper: #fffdf7;
  --cream: #f6f0df;
  --green: #0f765d;
  --green-dark: #095744;
  --green-soft: #dcefe8;
  --coral: #ed765e;
  --coral-soft: #fde4dc;
  --yellow: #f1c453;
  --line: #d9dfd8;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(35, 57, 48, 0.12);
  --soft-shadow: 0 12px 30px rgba(35, 57, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(241, 196, 83, 0.18), transparent 24rem),
    linear-gradient(rgba(23, 53, 45, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 53, 45, 0.028) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 28px 28px, 28px 28px, auto;
  font-family: "Gowun Dodum", "Malgun Gothic", sans-serif;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(241, 196, 83, 0.85);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  padding: 10px 9px;
  border-radius: 16px;
  background: var(--green);
  box-shadow: 0 7px 0 var(--green-dark);
}

.brand-mark span {
  display: block;
  border-radius: 8px 8px 3px 3px;
  background: var(--paper);
}

.brand-mark span:nth-child(1) { height: 16px; }
.brand-mark span:nth-child(2) { height: 24px; }
.brand-mark span:nth-child(3) { height: 19px; }

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.quiet-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.quiet-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.intro {
  position: relative;
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr);
  align-items: center;
  gap: 30px;
  overflow: hidden;
  padding: 54px 64px;
  border: 1px solid rgba(15, 118, 93, 0.18);
  border-radius: 36px;
  background:
    linear-gradient(115deg, rgba(220, 239, 232, 0.96), rgba(248, 243, 225, 0.94)),
    var(--cream);
  box-shadow: var(--shadow);
}

.intro::before,
.intro::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  border: 2px dashed rgba(15, 118, 93, 0.17);
}

.intro::before {
  width: 310px;
  height: 310px;
  right: -95px;
  top: -130px;
}

.intro::after {
  width: 160px;
  height: 160px;
  left: 44%;
  bottom: -118px;
}

.intro-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.intro h1 {
  max-width: 540px;
  margin: 0;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.intro-description {
  max-width: 560px;
  margin: 22px 0 0;
  color: #405e54;
  font-size: 17px;
  line-height: 1.85;
  word-break: keep-all;
}

.promise {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.promise span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(15, 118, 93, 0.2);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 700;
}

.intro-art {
  position: relative;
  min-height: 300px;
  z-index: 1;
}

.sun {
  position: absolute;
  top: 8px;
  right: 18px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 13px rgba(241, 196, 83, 0.2);
}

.book {
  position: absolute;
  overflow: hidden;
  border: 5px solid var(--ink);
  border-radius: 12px 20px 20px 12px;
  box-shadow: 12px 16px 0 rgba(23, 53, 45, 0.13);
}

.book::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  width: 4px;
  content: "";
  background: rgba(23, 53, 45, 0.18);
}

.book-back {
  width: 220px;
  height: 268px;
  right: 40px;
  bottom: 8px;
  background: #9fd4ce;
  transform: rotate(7deg);
}

.book-front {
  width: 218px;
  height: 276px;
  left: 34px;
  bottom: 2px;
  background: var(--coral-soft);
  transform: rotate(-8deg);
}

.picture-cloud {
  position: absolute;
  top: 55px;
  left: 74px;
  width: 72px;
  height: 25px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 25px 7px 0 -4px rgba(255, 255, 255, 0.85), -20px 8px 0 -6px rgba(255, 255, 255, 0.85);
}

.picture-hill {
  position: absolute;
  left: 30px;
  right: -30px;
  bottom: -54px;
  height: 150px;
  border-radius: 50% 50% 0 0;
  background: #57a879;
  transform: rotate(-7deg);
}

.line-flower {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 4px solid var(--ink);
  border-radius: 55% 45% 50% 50%;
  background: var(--paper);
}

.line-flower::before,
.line-flower::after {
  position: absolute;
  width: 28px;
  height: 28px;
  content: "";
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.line-flower::before { left: -21px; top: 7px; }
.line-flower::after { right: -21px; top: 7px; }
.flower-one { left: 76px; top: 58px; }
.flower-two { left: 106px; top: 132px; transform: scale(0.7); }
.flower-top { display: none; }

.book-line {
  position: absolute;
  left: 56px;
  right: 28px;
  bottom: 34px;
  height: 5px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 -16px 0 rgba(23, 53, 45, 0.35);
}

.pencil {
  position: absolute;
  z-index: 4;
  width: 178px;
  height: 28px;
  right: 20px;
  bottom: 35px;
  border: 4px solid var(--ink);
  border-radius: 4px 12px 12px 4px;
  background: var(--yellow);
  transform: rotate(-28deg);
  box-shadow: 7px 8px 0 rgba(23, 53, 45, 0.12);
}

.pencil::before {
  position: absolute;
  left: -30px;
  top: -4px;
  content: "";
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-right: 30px solid var(--ink);
}

.pencil::after {
  position: absolute;
  left: -22px;
  top: 2px;
  content: "";
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 21px solid #e7b986;
}

.book-picker {
  padding: 82px 0 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.section-heading h2,
.coming-panel h2 {
  margin: 0;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.section-heading > p {
  max-width: 360px;
  margin: 0 0 4px;
  color: var(--muted);
  text-align: right;
  line-height: 1.65;
}

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

.book-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1.2fr);
  min-height: 376px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-visual {
  position: relative;
  min-height: 260px;
  overflow: hidden;
}

.coloring-visual {
  background:
    radial-gradient(circle at 20% 18%, rgba(241, 196, 83, 0.4), transparent 28%),
    var(--green-soft);
}

.picture-visual {
  background:
    radial-gradient(circle at 75% 20%, rgba(237, 118, 94, 0.25), transparent 32%),
    #f5e9d5;
}

.drawing-frame {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 142px;
  height: 190px;
  border: 4px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  transform: translate(-50%, -50%) rotate(-5deg);
  box-shadow: 10px 11px 0 rgba(23, 53, 45, 0.13);
}

.drawing-stem {
  position: absolute;
  left: 67px;
  top: 83px;
  width: 4px;
  height: 76px;
  background: var(--ink);
  transform: rotate(7deg);
}

.drawing-bloom {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
}

.bloom-left { left: 30px; top: 53px; }
.bloom-right { right: 26px; top: 55px; }
.bloom-top { left: 49px; top: 30px; }

.crayon {
  position: absolute;
  width: 22px;
  height: 104px;
  border: 3px solid var(--ink);
  border-radius: 6px 6px 3px 3px;
  box-shadow: 6px 7px 0 rgba(23, 53, 45, 0.11);
}

.crayon::before {
  position: absolute;
  top: -17px;
  left: -3px;
  content: "";
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 17px solid var(--ink);
}

.crayon-yellow { right: 28px; bottom: 15px; background: var(--yellow); transform: rotate(19deg); }
.crayon-green { left: 23px; bottom: 5px; background: #50a47a; transform: rotate(-17deg); }

.story-page {
  position: absolute;
  top: 76px;
  width: 113px;
  height: 164px;
  border: 4px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 10px 0 rgba(23, 53, 45, 0.12);
}

.story-left {
  right: 50%;
  border-radius: 9px 2px 2px 9px;
  transform: rotate(-4deg);
}

.story-right {
  left: 50%;
  border-radius: 2px 9px 9px 2px;
  transform: rotate(4deg);
}

.story-sun {
  position: absolute;
  top: 22px;
  right: 18px;
  width: 30px;
  height: 30px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
}

.story-ground {
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: -24px;
  height: 82px;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 0 0;
  background: #7cb990;
}

.story-text-line {
  position: relative;
  display: block;
  width: 70%;
  height: 5px;
  margin: 22px auto -10px;
  border-radius: 999px;
  background: rgba(23, 53, 45, 0.5);
}

.story-text-line.line-wide { width: 76%; margin-top: 48px; }
.story-text-line.line-short { width: 45%; margin-left: 15%; }

.card-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 34px 32px 30px;
}

.card-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 700;
}

.coming-label {
  color: #954a3c;
  background: var(--coral-soft);
}

.card-content h3 {
  margin: 18px 0 10px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 30px;
  font-weight: 400;
}

.card-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  word-break: keep-all;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 22px;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #52625c;
  background: #fafbf8;
  font-size: 12px;
  font-weight: 700;
}

.start-button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: var(--green);
  font-weight: 700;
  box-shadow: 0 6px 0 var(--green-dark);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--green-dark);
}

.start-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--green-dark);
}

.new-editor-link {
  width: 100%;
  margin-top: 13px;
  color: var(--green-dark);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 12px;
  font-weight: 700;
}

.disabled-button {
  justify-content: center;
  color: #74665d;
  background: #ebe5df;
  box-shadow: 0 6px 0 #d5ccc4;
  cursor: not-allowed;
}

.disabled-button:hover {
  transform: none;
  box-shadow: 0 6px 0 #d5ccc4;
}

.picture-start-button {
  background: #d9604a;
  box-shadow: 0 6px 0 #a94030;
}

.picture-start-button:hover {
  box-shadow: 0 8px 0 #a94030;
}

.picture-start-button:active {
  box-shadow: 0 2px 0 #a94030;
}

.coming-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 26px 0 70px;
  padding: 24px 28px;
  border: 2px dashed rgba(15, 118, 93, 0.28);
  border-radius: 24px;
  background: rgba(220, 239, 232, 0.4);
}

.coming-icon {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--white);
  background: var(--green);
  font-size: 34px;
}

.coming-panel h2 {
  font-size: 23px;
}

.coming-panel p,
footer p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

footer {
  padding: 0 0 42px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1040px) {
  .intro {
    grid-template-columns: 1fr 0.9fr;
    padding: 46px;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    grid-template-columns: minmax(230px, 0.7fr) 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 620px);
  }

  .site-header {
    min-height: 82px;
  }

  .brand small,
  .header-actions {
    display: none;
  }

  .intro {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 38px 28px 28px;
    border-radius: 28px;
  }

  .intro h1 {
    font-size: clamp(42px, 13vw, 60px);
  }

  .intro-art {
    min-height: 255px;
    transform: scale(0.88);
    transform-origin: center bottom;
  }

  .book-picker {
    padding-top: 58px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 10px;
    text-align: left;
  }

  .book-card {
    grid-template-columns: 1fr;
  }

  .card-visual {
    min-height: 250px;
  }

  .card-content {
    padding: 28px 24px 26px;
  }

  .coming-panel {
    align-items: flex-start;
    padding: 22px;
  }
}

@media (max-width: 430px) {
  .intro {
    padding-inline: 22px;
  }

  .intro-description {
    font-size: 15px;
  }

  .promise span {
    font-size: 12px;
  }

  .intro-art {
    margin-inline: -30px;
  }

  .section-heading h2 {
    font-size: 29px;
  }

  .coming-panel {
    display: block;
  }

  .coming-icon {
    margin-bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
/* 로그인 연결 전에도 여러 책을 안전하게 다시 찾을 수 있는 로컬 책장 */
.local-library-link {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 2px solid var(--ink, #24352f);
  border-radius: 999px;
  color: #fffdf7;
  background: var(--ink, #24352f);
  box-shadow: 0 12px 28px rgba(36, 53, 47, 0.2);
  font-weight: 800;
  text-decoration: none;
}

.local-library-link:focus-visible {
  outline: 4px solid rgba(216, 119, 58, 0.35);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .local-library-link {
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-content: center;
  }
}
