@charset "UTF-8";
/* 도란콩 화면 스타일 2판이에요. 색·글자·모양의 기준은 docs/DESIGN-SYSTEM.ko.md 를 봐요. */

/* 제목 글꼴: 해바라기체 굵은 것(SIL OFL 1.1). 못 불러오면 기기 고딕으로 보여요. */
@font-face { font-family: "Sunflower"; src: url("fonts/Sunflower-Bold.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --font-title: "Sunflower", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;

  /* 글자 */
  --ink: #1f3b33;
  --ink-2: #4e6a60;
  --ink-3: #4e6a60;

  /* 바탕 */
  --cream: #fff8e3;
  --paper: #ffffff;
  --line: #f0e4bf;

  /* 콩노랑: 브랜드의 얼굴색 */
  --bean: #ffe16b;
  --bean-mid: #ffea94;
  --bean-soft: #fff5cf;
  --bean-edge: #efc233;
  --bean-ink: #6b4e00;

  /* 꿀노랑: 누르는 곳(주요 버튼, 지금 읽을 수 있다는 표시, 진행 점) */
  --go: #ffc940;
  --go-edge: #e0a51c;
  --go-ink: #463300;
  --go-soft: #fff4cf;
  --go-text: #7a5600;
  --go-dot: #f2b31c;
  --go-ring: #c48600;

  /* 새싹초록: 콩이의 잎, 이야기 놀이, 부모님 공간 */
  --sprout: #56b748;
  --sprout-mid: #cdedbe;
  --sprout-soft: #e7f6dd;
  --sprout-ink: #23591a;

  /* 감주황·하늘·포도·딸기: 놀이 종류와 상태 */
  --persimmon: #ff8a4c;
  --persimmon-mid: #ffcfb1;
  --persimmon-soft: #ffe7d9;
  --persimmon-edge: #e9925f;
  --persimmon-ink: #7a3a12;
  --sky: #6cc4f2;
  --sky-mid: #bde5f8;
  --sky-soft: #ddf2fd;
  --sky-edge: #7fbfe2;
  --sky-ink: #0f4f74;
  --grape: #9c8cf0;
  --grape-mid: #d6cdfb;
  --grape-soft: #ece8ff;
  --grape-edge: #a99be6;
  --grape-ink: #3f2f9e;
  --berry: #ff8fab;
  --berry-mid: #ffc9d6;
  --berry-soft: #ffe4ec;
  --berry-edge: #ee9db1;
  --berry-ink: #8e1f44;
  --danger: #a93a24;
  --focus: #1e7cb3;

  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow: 0 12px 28px rgba(107, 78, 0, .12), 0 2px 0 rgba(107, 78, 0, .05);
  --shadow-soft: 0 6px 16px rgba(107, 78, 0, .10);
  --gutter: 20px;
  --blob: 58% 42% 55% 45% / 52% 56% 44% 48%;
}

/* 색 이름표: 영역마다 한 가지 색을 골라 써요. */
.tone-bean { --tone: var(--bean); --tone-mid: var(--bean-mid); --tone-soft: var(--bean-soft); --tone-edge: var(--bean-edge); --tone-ink: var(--bean-ink); }
.tone-sprout { --tone: var(--sprout); --tone-mid: var(--sprout-mid); --tone-soft: var(--sprout-soft); --tone-edge: #a3d38c; --tone-ink: var(--sprout-ink); }
.tone-persimmon { --tone: var(--persimmon); --tone-mid: var(--persimmon-mid); --tone-soft: var(--persimmon-soft); --tone-edge: var(--persimmon-edge); --tone-ink: var(--persimmon-ink); }
.tone-sky { --tone: var(--sky); --tone-mid: var(--sky-mid); --tone-soft: var(--sky-soft); --tone-edge: var(--sky-edge); --tone-ink: var(--sky-ink); }
.tone-grape { --tone: var(--grape); --tone-mid: var(--grape-mid); --tone-soft: var(--grape-soft); --tone-edge: var(--grape-edge); --tone-ink: var(--grape-ink); }
.tone-berry { --tone: var(--berry); --tone-mid: var(--berry-mid); --tone-soft: var(--berry-soft); --tone-edge: var(--berry-edge); --tone-ink: var(--berry-ink); }

/* 기본 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream); font-synthesis: none; -webkit-font-smoothing: antialiased; line-height: 1.5; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
svg { display: block; flex-shrink: 0; }
button svg, a svg { pointer-events: none; }
h1, h2, h3 { font-family: var(--font-title); word-break: keep-all; text-wrap: balance; letter-spacing: -.01em; }
p { word-break: keep-all; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 50; background: var(--paper); padding: 14px 18px; border-radius: 14px; font-weight: 700; }
.skip:focus { top: 10px; }
.kong { height: auto; user-select: none; -webkit-user-drag: none; }
/* 화면에는 보이지 않고 화면 낭독기만 읽는 글 */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* 시작 화면 */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bean); text-align: center; padding: 24px; }
.boot img { width: 132px; height: auto; }
.boot h1 { font-size: 32px; font-weight: 800; }
.boot p { font-size: 16px; color: var(--bean-ink); font-weight: 600; }

/* 버튼 */
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 12px 22px; border-radius: var(--r-md); font-size: 16px; font-weight: 800; line-height: 1.25; text-align: center; transition: transform .08s ease-out, box-shadow .08s ease-out; }
.primary { background: var(--go); color: var(--go-ink); box-shadow: 0 5px 0 var(--go-edge); }
.secondary { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 5px 0 var(--line); }
.primary:not(:disabled):active, .secondary:not(:disabled):active { transform: translateY(3px); }
.primary:not(:disabled):active { box-shadow: 0 2px 0 var(--go-edge); }
.secondary:not(:disabled):active { box-shadow: inset 0 0 0 2px var(--line), 0 2px 0 var(--line); }
.primary:disabled { background: #e4ebe6; box-shadow: 0 5px 0 #cfdad3; color: var(--ink-2); transform: none; }
.secondary:disabled, .text-link:disabled { opacity: .55; transform: none; }
.primary.danger-action { color: #fff; }
.primary svg, .secondary svg { width: 20px; height: 20px; }
.primary.big { min-height: 60px; font-size: 18px; border-radius: 20px; width: 100%; }
.primary.danger-action { background: var(--danger); box-shadow: 0 5px 0 #7c2916; }
.primary.danger-action:not(:disabled):active { box-shadow: 0 2px 0 #7c2916; }
.text-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.text-link svg { width: 18px; height: 18px; }

/* 말풍선: 도란도란 이야기하는 브랜드의 모양 */
.bubble { position: relative; background: var(--paper); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-soft); }
.bubble::before { content: ""; position: absolute; left: -9px; top: 50%; width: 20px; height: 20px; margin-top: -10px; background: inherit; border-radius: 5px; transform: rotate(45deg); }

/* 작은 이름표 */
.tag, .demo-tag { display: inline-flex; align-items: center; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: 12px; font-weight: 800; font-style: normal; line-height: 1.4; }
.demo-tag { background: var(--go-soft); color: var(--go-text); font-size: 13px; }
.chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; line-height: 1.2; box-shadow: 0 3px 10px rgba(31, 59, 51, .18); }
.chip svg { width: 15px; height: 15px; }
.chip-live { left: 12px; top: 12px; background: var(--go); color: var(--go-ink); }
.beans { display: flex; gap: 5px; margin-top: 8px; }
.beans i { width: 15px; height: 12px; border-radius: var(--blob); background: #eadfb8; }
.beans i.on { background: var(--go-dot); }

/* 틀: 폰은 아래 탭, 넓은 화면은 왼쪽 메뉴 */
.app-frame { min-height: 100dvh; --view-tone: var(--bean); }
.app-frame.view-explore { --view-tone: var(--sky-mid); }
.app-frame.view-library { --view-tone: var(--berry-mid); }
.app-frame.view-my { --view-tone: var(--sprout-mid); }
.rail { display: none; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top)) var(--gutter) 10px; background: var(--view-tone); }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; }
.brand-badge { width: 44px; height: 44px; border-radius: 15px; box-shadow: 0 3px 0 rgba(11, 90, 55, .28); }
.brand-word { width: auto; height: 31px; }
.app-header .header-search { display: none; }
.login-top { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 800; white-space: nowrap; box-shadow: 0 3px 0 rgba(31, 59, 51, .12); }
.login-top svg { width: 17px; height: 17px; }
.mini-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: var(--blob); background: var(--bean); font-size: 13px; }
.page { padding: 0 var(--gutter) calc(112px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }
.page:focus { outline: none; }

/* 아래 탭 */
.mobile-nav { position: fixed; inset: auto 0 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); background: var(--paper); border-radius: 26px 26px 0 0; box-shadow: 0 -8px 26px rgba(107, 78, 0, .13); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; border-radius: 16px; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.nav-icon { display: grid; place-items: center; width: 52px; height: 32px; border-radius: var(--blob); transition: background-color .16s ease-out; }
.nav-icon svg { width: 24px; height: 24px; }
.nav-item[aria-current=page] { color: var(--ink); font-weight: 800; }
.nav-item[aria-current=page] .nav-icon { background: var(--bean-mid); }

/* 홈: 인사 */
.hello { display: flex; align-items: center; gap: 4px; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 54px; background: var(--bean); border-radius: 0 0 40px 40px; }
.hello-kong { width: 104px; flex-shrink: 0; margin-left: -6px; }
.hello-bubble { flex: 1; min-width: 0; }
.bubble-name { display: inline-flex; margin-bottom: 4px; padding: 2px 10px; border-radius: 999px; background: var(--bean-mid); font-size: 13px; font-weight: 800; color: var(--bean-ink); }
.hello-bubble h1 { min-height: 2.7em; font-size: 21px; line-height: 1.35; font-weight: 800; }
.hello-bubble p { margin-top: 5px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.arrive .hello-kong { animation: kong-pop .7s cubic-bezier(.3, 1.5, .5, 1) both; transform-origin: 50% 100%; }
.arrive .hello-bubble { animation: bubble-in .4s ease-out .3s both; }
.kong.boing, .arrive .hello-kong.boing { animation: kong-boing .55s cubic-bezier(.3, 1.5, .5, 1); transform-origin: 50% 100%; }
@keyframes kong-boing { 0% { transform: none; } 30% { transform: translateY(-16px) scale(1.05, .95); } 62% { transform: translateY(0) scale(.96, 1.04); } 100% { transform: none; } }
@keyframes kong-pop { from { transform: translateY(18px) scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bubble-in { from { transform: translateX(-10px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* 홈: 지금 읽을 책 */
.today { margin-top: -36px; background: var(--paper); border-radius: var(--r-xl); padding: 10px; box-shadow: var(--shadow); }
.today-picture { position: relative; display: block; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--bean-soft); }
.today-picture img { width: 100%; height: 100%; object-fit: cover; object-position: 34% 42%; }
.today-copy { padding: 16px 10px 10px; }
.today-kicker { font-size: 13px; font-weight: 800; color: var(--go-text); }
.today-copy h2 { margin-top: 4px; font-size: 30px; line-height: 1.2; font-weight: 800; }
.today-sub { margin-top: 4px; font-size: 16px; font-weight: 700; }
.today-desc { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.facts li { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: var(--bean-soft); font-size: 13px; font-weight: 700; color: var(--bean-ink); }
.facts svg { width: 15px; height: 15px; }

/* 이어 읽기 */
.resume { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); }
.resume img { width: 68px; height: 68px; object-fit: cover; border-radius: 16px; flex-shrink: 0; }
.resume-text { flex: 1; min-width: 0; }
.resume-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.resume strong { display: block; font-size: 16px; font-weight: 800; }
.resume-meta { font-size: 13px; color: var(--ink-2); }
.resume .primary { min-height: 46px; padding: 10px 14px; font-size: 14px; flex-shrink: 0; }

/* 구역 */
.section { margin-top: 30px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: 22px; font-weight: 800; line-height: 1.3; }
.section-head p { margin-top: 2px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.section-head .text-link { flex-shrink: 0; margin-bottom: -8px; }

/* 놀이 고르기 */
.playground { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.play-tile { position: relative; display: flex; align-items: flex-start; min-height: 124px; padding: 14px; border-radius: var(--r-lg); background: var(--tone-mid); box-shadow: 0 5px 0 var(--tone-edge); text-align: left; overflow: hidden; transition: transform .08s ease-out, box-shadow .08s ease-out; }
.play-tile:not(:disabled):active { transform: translateY(3px); box-shadow: 0 2px 0 var(--tone-edge); }
.play-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; max-width: 70%; }
.play-text strong { font-family: var(--font-title); font-size: 20px; font-weight: 800; }
.play-text small { font-size: 13px; font-weight: 700; color: var(--tone-ink); word-break: keep-all; }
.play-text .tag { margin-top: 6px; }
.play-kong { position: absolute; right: -6px; bottom: -10px; width: 43%; max-width: 98px; }

/* 책 카드 */
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
.book-card { position: relative; min-width: 0; }
.book-open { display: flex; flex-direction: column; width: 100%; text-align: left; border-radius: 22px; }
.book-open:focus-visible { outline-offset: 2px; }
.book-cover { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 20px; border: 4px solid var(--paper); background: var(--tone-soft); overflow: hidden; box-shadow: 0 8px 18px rgba(31, 59, 51, .16); transition: transform .12s ease-out; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
img.cover-gold-axe { object-position: 31% 50%; }
.book-open:active .book-cover { transform: scale(.97); }
.badge { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.3; }
.badge svg { width: 12px; height: 12px; }
.badge.live { background: var(--go); color: var(--go-ink); }
.badge.preview { background: rgba(255, 255, 255, .94); color: var(--ink); }
.book-title { margin-top: 10px; font-family: var(--font-title); font-size: 17px; font-weight: 800; line-height: 1.35; word-break: keep-all; }
.book-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.book-meta span { display: inline-flex; align-items: center; gap: 3px; }
.book-meta svg { width: 13px; height: 13px; }
.heart { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); color: var(--ink-3); box-shadow: 0 3px 10px rgba(31, 59, 51, .2); transition: transform .12s ease-out; }
.heart svg { width: 22px; height: 22px; }
.heart:not(:disabled):active { transform: scale(.9); }
.heart[aria-pressed=true] { background: var(--berry-mid); color: var(--berry-ink); }
.heart[aria-pressed=true] svg { fill: currentColor; }

/* 홈의 책꽂이: 폰에서는 옆으로 넘겨요 */
.shelf { display: flex; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter) 18px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf .book-card { flex: 0 0 43%; scroll-snap-align: start; }
.shelf .book-card:nth-child(odd) .book-cover { transform: rotate(-1.4deg); }
.shelf .book-card:nth-child(even) .book-cover { transform: rotate(1.2deg); }
.shelf .book-open:active .book-cover { transform: scale(.97); }

/* 준비 중인 활동 줄 */
.soon-row { display: flex; gap: 12px; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 10px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.soon-row::-webkit-scrollbar { display: none; }
.soon-card { flex: 0 0 82%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-lg); background: var(--tone-soft); text-align: left; scroll-snap-align: start; box-shadow: 0 4px 0 var(--tone-mid); transition: transform .08s ease-out; }
.soon-card:not(:disabled):active { transform: translateY(2px); }
.soon-cover { flex-shrink: 0; width: 72px; aspect-ratio: 3 / 4; border-radius: 14px; border: 3px solid var(--paper); overflow: hidden; background: var(--paper); }
.soon-cover img { width: 100%; height: 100%; object-fit: cover; }
.soon-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.soon-text strong { font-family: var(--font-title); font-size: 17px; font-weight: 800; line-height: 1.35; word-break: keep-all; }
.soon-text > span { font-size: 13px; font-weight: 600; color: var(--tone-ink); word-break: keep-all; }

/* 부모님께 */
.grownups { display: flex; align-items: center; gap: 6px; margin-top: 34px; }
.grownups-kong { width: 108px; flex-shrink: 0; margin-left: -6px; }
.grownups-bubble { flex: 1; min-width: 0; background: var(--sprout-soft); box-shadow: none; }
.grownups-bubble h2 { font-size: 17px; font-weight: 800; line-height: 1.4; }
.grownups-bubble p { margin: 4px 0 12px; font-size: 14px; color: var(--sprout-ink); font-weight: 600; }
.grownups-bubble .secondary { min-height: 46px; padding: 10px 16px; font-size: 14px; box-shadow: 0 4px 0 var(--sprout-mid); }
.grownups-bubble .secondary:not(:disabled):active { box-shadow: 0 1px 0 var(--sprout-mid); }

/* 바닥 안내 */
.page-footer { margin-top: 36px; padding-top: 18px; border-top: 2px dashed var(--line); color: var(--ink-2); font-size: 13px; }
.page-footer nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.page-footer a, .page-footer button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 12px; font-weight: 700; }
.page-footer p { margin-top: 6px; padding: 0 10px; font-weight: 600; }

/* 탭마다 맨 위 색 언덕 */
.page-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: 0 calc(var(--gutter) * -1) 20px; padding: 6px var(--gutter) 0; background: var(--view-tone); border-radius: 0 0 40px 40px; overflow: hidden; min-height: 132px; }
.page-hero-text { padding: 6px 0 22px; min-width: 0; }
.page-hero h1 { font-size: 26px; font-weight: 800; line-height: 1.3; }
.page-hero p { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--tone-ink); }
.page-hero-kong { width: 112px; flex-shrink: 0; margin-bottom: -14px; }

/* 찾기 */
.search-form { position: relative; display: block; }
.search-form > svg { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--ink-3); pointer-events: none; }
.search-form input { width: 100%; min-width: 0; height: 54px; padding: 0 56px 0 48px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 16px; font-weight: 600; }
.search-form input::placeholder { color: var(--ink-3); }
.search-form input:focus { outline: none; border-color: var(--go-ring); }
.search-form input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.search-form button { position: absolute; right: 5px; top: 5px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bean); }
.search-form button svg { width: 20px; height: 20px; }
.filters { display: flex; gap: 8px; margin: 14px calc(var(--gutter) * -1) 0; padding: 6px var(--gutter) 8px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 16px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); font-size: 15px; font-weight: 800; white-space: nowrap; }
.filter svg { width: 18px; height: 18px; color: var(--tone-ink); }
.filter[aria-pressed=true] { background: var(--tone-mid); box-shadow: inset 0 0 0 2px var(--tone-edge); }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 18px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.results-bar label { display: inline-flex; align-items: center; gap: 6px; }
.results-bar select { min-height: 44px; padding: 0 30px 0 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); font-weight: 700; }
.preview-note, .account-note { margin-top: 26px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255, 255, 255, .7); font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* 비어 있을 때 */
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 28px 22px 30px; border-radius: var(--r-xl); background: var(--paper); text-align: center; box-shadow: var(--shadow-soft); }
.empty-kong { width: 132px; margin-bottom: 4px; }
.empty-state h2 { font-size: 20px; font-weight: 800; }
.empty-state p { font-size: 15px; color: var(--ink-2); }
.empty-state .primary { margin-top: 10px; }
.empty-state + .primary { margin-top: 16px; width: 100%; }

/* 내 서재 */
.library-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; margin-bottom: 20px; border-radius: 20px; background: var(--berry-soft); }
.library-tabs button { min-height: 46px; border-radius: 15px; font-size: 15px; font-weight: 800; color: var(--berry-ink); }
.library-tabs button[aria-selected=true] { background: var(--paper); color: var(--ink); box-shadow: 0 3px 8px rgba(142, 31, 68, .14); }
#library-panel .resume { margin-top: 0; }

/* 마이 */
.profile-panel { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-xl); background: var(--paper); box-shadow: var(--shadow-soft); }
.avatar { width: 72px; height: 72px; border-radius: 26px; overflow: hidden; box-shadow: 0 4px 0 rgba(11, 90, 55, .25); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-text h2 { margin-top: 6px; font-size: 20px; font-weight: 800; }
.profile-text p { margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.profile-panel > .primary, .profile-panel > .secondary { grid-column: 1 / -1; }
.settings-list { margin-top: 16px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-soft); overflow: hidden; }
.settings-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 16px; text-align: left; }
.settings-row + .settings-row { border-top: 2px solid #f7f0d8; }
.settings-row:not(:disabled):active { background: var(--bean-soft); }
.row-icon { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--blob); background: var(--tone-mid); color: var(--tone-ink); }
.row-icon svg { width: 22px; height: 22px; }
.row-text { flex: 1; min-width: 0; }
.row-text strong { display: block; font-size: 16px; font-weight: 800; }
.row-text small { display: block; margin-top: 1px; font-size: 13px; color: var(--ink-2); }
.settings-row .chevron { width: 18px; height: 18px; color: var(--ink-3); }
.clear-button .row-text strong { color: var(--danger); }

/* 창: 폰에서는 아래에서 올라와요 */
dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; padding: 0 0 env(safe-area-inset-bottom); border: 0; border-radius: 30px 30px 0 0; background: var(--paper); color: var(--ink); overflow-y: auto; box-shadow: 0 -10px 60px rgba(31, 59, 51, .3); }
dialog::backdrop { background: rgba(31, 59, 51, .5); }
dialog[open] { animation: sheet-up .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; right: 14px; top: 14px; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); box-shadow: 0 3px 10px rgba(31, 59, 51, .18); }
.modal-close svg { width: 22px; height: 22px; }
.modal-inner { padding: 26px 22px 28px; }
#dialog-title:focus { outline: none; }
.modal-inner > h2 { padding-right: 44px; font-size: 24px; font-weight: 800; line-height: 1.35; }
.modal-inner > p { margin: 12px 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.modal-inner label { font-size: 15px; font-weight: 700; }
.modal-meta { font-size: 14px; font-weight: 700; }
.modal-status { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--bean-soft); color: var(--bean-ink); font-size: 14px; font-weight: 700; line-height: 1.5; }
.modal-inner > .modal-status { color: var(--bean-ink); }
.modal-status:empty { display: none; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.modal-actions > * { flex: 1 1 140px; }
.detail-top { display: flex; align-items: center; gap: 16px; padding: 26px 64px 22px 22px; background: var(--tone-mid); }
.detail-cover { flex-shrink: 0; width: 104px; aspect-ratio: 3 / 4; border-radius: 16px; border: 4px solid var(--paper); overflow: hidden; background: var(--paper); transform: rotate(-3deg); box-shadow: 0 8px 18px rgba(31, 59, 51, .2); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-head { min-width: 0; }
.detail-head .demo-tag { background: var(--paper); color: var(--tone-ink); }
.detail-head h2 { margin-top: 8px; font-size: 24px; font-weight: 800; line-height: 1.3; }
.detail-sub { margin-top: 3px; font-size: 15px; font-weight: 700; color: var(--tone-ink); }
.detail-dialog .modal-inner { padding-top: 18px; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.skills span { padding: 7px 12px; border-radius: 999px; background: var(--bean-soft); font-size: 14px; font-weight: 700; color: var(--bean-ink); }
.question-note { display: flex; align-items: center; gap: 4px; margin: 18px 0; }
.question-kong { width: 64px; flex-shrink: 0; margin-left: -4px; }
.question-note .bubble { flex: 1; min-width: 0; background: var(--sky-soft); box-shadow: none; font-size: 15px; line-height: 1.6; font-weight: 600; }
.question-note strong { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 800; color: var(--sky-ink); }
.login-modal { text-align: center; }
.login-art { width: 124px; margin: 0 auto 12px; }
.login-art .kong { width: 100%; }
.login-modal > h2 { padding-right: 0; margin-top: 10px; }
.login-modal .primary, .login-modal .secondary, .auth-wide { display: flex; width: 100%; margin-top: 12px; }
.login-modal .text-link { margin: 6px 6px 0; }
.fine-print { margin-top: 16px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.install-steps { margin: 16px 0; padding: 16px 16px 16px 36px; border-radius: var(--r-md); background: var(--bean-soft); font-size: 15px; line-height: 1.9; }
.modal-inner .account-note { margin-top: 20px; background: var(--cream); }
.auth-input { display: block; width: 100%; min-height: 52px; padding: 12px 14px; margin: 8px 0 14px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--paper); font-size: 16px; }
.auth-input:focus { outline: none; border-color: var(--go-ring); }
.auth-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.auth-consent { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 12px 0; text-align: left; font-size: 14px; line-height: 1.6; font-weight: 600; }
.auth-consent input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--go-ring); }
.auth-consent a { text-decoration: underline; text-underline-offset: 3px; }
.auth-error { min-height: 22px; margin: 8px 0; font-size: 14px; line-height: 1.6; color: var(--danger); font-weight: 600; }
.kakao-signin { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 1px 0; border-radius: var(--r-sm); background: #fee500; color: #191919; }
.kakao-signin img { display: block; width: 224px; height: 46px; max-width: 100%; object-fit: contain; }
.kakao-signin:disabled { opacity: .6; cursor: progress; }

/* 잠깐 뜨는 알림 */
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 40; width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 13px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; text-align: center; box-shadow: 0 8px 24px rgba(31, 59, 51, .3); }

/* 조금 큰 폰과 세로 태블릿 */
@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .hello { padding-bottom: 64px; gap: 10px; }
  .hello-kong { width: 148px; }
  .hello-bubble { max-width: 460px; padding: 22px 26px; }
  .hello-bubble h1 { font-size: 27px; }
  .hello-bubble p { font-size: 16px; }
  .today { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 8px; padding: 12px; }
  .today-picture { aspect-ratio: auto; height: 100%; min-height: 290px; }
  .today-copy { padding: 14px 18px; }
  .today-copy h2 { font-size: 34px; }
  .playground { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .play-tile { min-height: 178px; }
  .play-text { max-width: 100%; }
  .play-kong { width: 54%; max-width: 92px; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 20px; }
  .shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 6px 0 0; overflow: visible; }
  .soon-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .soon-card { flex-direction: column; align-items: flex-start; }
  .soon-cover { width: 96px; }
  .grownups-kong { width: 150px; }
  .grownups-bubble { max-width: 520px; padding: 20px 24px; }
  .page-hero { min-height: 164px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero p { font-size: 16px; }
  .page-hero-kong { width: 150px; }
  .empty-state + .primary { display: flex; width: fit-content; min-width: 220px; margin-left: auto; margin-right: auto; }
  .profile-panel { grid-template-columns: auto 1fr auto; padding: 22px; }
  .profile-panel > .primary, .profile-panel > .secondary { grid-column: auto; }
  dialog { width: min(540px, calc(100% - 48px)); margin: auto; padding-bottom: 0; border-radius: var(--r-xl); box-shadow: 0 30px 80px rgba(31, 59, 51, .3); }
  .modal-inner { padding: 30px 30px 32px; }
  .detail-top { padding: 30px 70px 26px 30px; }
  .detail-cover { width: 124px; }
}

/* 가로 태블릿과 컴퓨터: 왼쪽 메뉴 */
@media (min-width: 900px) {
  .mobile-nav, .mobile-brand { display: none; }
  .rail { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; align-items: center; width: 116px; padding: max(18px, env(safe-area-inset-top)) 10px 18px; background: var(--paper); box-shadow: 4px 0 24px rgba(107, 78, 0, .08); }
  .rail-brand { flex-direction: column; gap: 6px; }
  .rail-brand .brand-badge { width: 60px; height: 60px; border-radius: 20px; }
  .rail-brand .brand-word { height: 30px; }
  .rail-nav { display: grid; gap: 8px; width: 100%; margin-top: 22px; }
  .rail .nav-item { min-height: 76px; font-size: 13px; }
  .rail .nav-icon { width: 60px; height: 40px; }
  .rail .nav-icon svg { width: 26px; height: 26px; }
  .rail-foot { margin-top: auto; text-align: center; }
  .rail-kong { width: 84px; margin: 0 auto 6px; }
  .rail-foot p { font-size: 12px; line-height: 1.5; font-weight: 600; color: var(--ink-2); }
  .app-body { margin-left: 116px; }
  .app-header { justify-content: flex-end; padding: 18px 40px 10px; background: none; }
  .app-header .header-search { display: block; flex: 1; max-width: 440px; margin-right: auto; }
  .page { padding: 6px 40px 56px; }
  .hello, .page-hero { margin: 0 0 22px; border-radius: var(--r-xl); }
  .hello { padding: 18px 30px 70px; }
  .hello-kong { width: 170px; }
  .hello-bubble h1 { font-size: 30px; }
  .today { margin: -52px 22px 0; }
  .today-copy h2 { font-size: 40px; }
  .today-copy .primary.big { width: auto; min-width: 260px; }
  .resume { margin: 18px 22px 0; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
  .shelf { grid-template-columns: repeat(4, minmax(0, 210px)); }
  .page-hero { padding: 14px 36px 0; }
  .page-hero-kong { width: 168px; }
  .explore-search { display: none; }
  .filters { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .library-tabs { max-width: 420px; }
  .settings-list, .profile-panel { max-width: 760px; }
  .toast { left: calc(50% + 58px); bottom: 28px; }
}

/* 아주 좁은 폰 */
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .hello-kong { width: 88px; }
  .hello-bubble h1 { font-size: 19px; }
  .brand-word { height: 27px; }
  .login-top { padding: 0 11px; font-size: 13px; }
  .today-copy h2 { font-size: 27px; }
  .resume { flex-wrap: wrap; }
  .resume .primary { width: 100%; }
  .play-text strong { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
