/* ============================================================
   북토리 (Booktory) — warm "quiet library" token layer
   Built ON TOP of Wanted DS tokens (wanted-tokens.css):
   we inherit spacing, radii, shadows, icon system & Pretendard,
   but override the palette to cream/ink/forest and add a
   Korean serif for book titles & headlines.
   ============================================================ */

/* Korean serif for book titles / headlines (산세리프 본문은 Pretendard) */
@import url("https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&display=swap");

:root {
  /* ---- Paper & ink (warm) ---- */
  --paper:            #F4EEE1;   /* app background — warm cream */
  --paper-deep:       #EDE6D6;   /* recessed cream (wells, inputs) */
  --surface:          #FEFCF7;   /* card surface — warm white */
  --surface-2:        #FBF7EE;   /* alt surface */

  --ink:              #2A2620;   /* primary text — warm near-black */
  --ink-strong:       #1F1B16;
  --ink-2:            #6A6356;   /* secondary text */
  --ink-3:            #978F7F;   /* meta / subtle */
  --ink-disabled:     #BDB6A6;
  --on-accent:        #FCFBF7;

  /* ---- 원목 붉은갈색 accent (buttons & emphasis only) ---- */
  --accent:           #A8553A;
  --accent-hover:     #92482F;
  --accent-press:     #7C3D27;
  --accent-subtle:    #F1E3DA;   /* tinted chip / well */
  --accent-ink:       #8A4630;   /* accent text on paper */

  /* ---- Warm secondary tints (book cloth, highlights) ---- */
  --terracotta:       #B5613C;
  --mustard:          #B98A2E;
  --plum:             #7A4A5E;
  --slate:            #4A5A6B;
  --clay:             #9A6A4A;

  /* ---- Lines (warm hairlines) ---- */
  --line:             #E8E1D2;   /* default hairline */
  --line-soft:        #F0EADC;   /* faint */
  --line-strong:      #DAD2C0;

  /* ---- Warm shadows (very soft) ---- */
  --shadow-paper-1: 0 1px 2px rgba(60,48,30,0.05);
  --shadow-paper-2: 0 4px 16px rgba(60,48,30,0.08);
  --shadow-lift:    0 10px 30px rgba(45,36,22,0.13);

  /* ---- Fonts ---- */
  --font-serif: "Nanum Myeongjo", "Apple SD Gothic Neo", serif;
}

/* App reset within phone */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.bt-app {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  height: 100%;
  letter-spacing: -0.01em;
}

/* Type helpers */
.bt-serif { font-family: var(--font-serif); letter-spacing: -0.005em; }

/* hide scrollbars inside the phone for a native feel */
.bt-scroll::-webkit-scrollbar { width: 0; height: 0; }
.bt-scroll { scrollbar-width: none; }

/* subtle fade-in for screen transitions */
@keyframes bt-rise {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}
@keyframes bt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bt-sheet-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes bt-scrim { from { opacity: 0; } to { opacity: 1; } }
@keyframes bt-pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

.bt-rise { animation: bt-rise 360ms cubic-bezier(0.16,1,0.3,1) forwards; }
.bt-fade { animation: bt-fade 240ms ease forwards; }

/* press feedback */
.bt-press { transition: transform 120ms cubic-bezier(0.16,1,0.3,1), background 160ms ease, box-shadow 200ms ease; }
.bt-press:active { transform: scale(0.97); }

/* heart beat */
@keyframes bt-beat {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.bt-beat { animation: bt-beat 420ms cubic-bezier(0.16,1,0.3,1); }

textarea, input { font-family: var(--font-sans); }
button { font-family: var(--font-sans); cursor: pointer; }

/* 게시글 상세의 책 카드(클릭 → 책 정보) */
.bt-bookcard:hover { background: var(--accent-subtle); border-color: var(--accent); }
.bt-bookcard:active { transform: scale(0.99); }
