/* =========================================================
   브레인스톤 놀이터 (샵인샵) 전용 디자인
   - brainstone.html에서만 불러요. 홈페이지 공통 디자인(style.css)은 건드리지 않아요.
   - 색은 아래 .bs 한 곳에서 바꿔요. 원목·놀이카드(머스터드·세이지·더스티 블루) 색에서 가져왔어요.
   - 블록 그림은 style="--h:4.8"처럼 실제 높이(cm)를 넣으면 같은 비율로 보여요.
   ========================================================= */

.bs {
  --bs-ink: #5C4A22;        /* 진한 나무색: 제목 글자, 간판 */
  --bs-wood: #8A6A43;       /* 원목색 */
  --bs-cream: #FBF8F2;      /* 카드 크림: 놀이터 바탕 */
  --bs-tile: #F3EDE3;
  --bs-accent: #C9822E;     /* 주황 나무: 숫자 동그라미, 강조 */
  --lv1: #E4B95E; --lv1-ink: #5C4A22;   /* ★ 머스터드 */
  --lv2: #A9BB9C; --lv2-ink: #3D4A35;   /* ★★ 세이지 */
  --lv3: #A3BAD2; --lv3-ink: #2F4258;   /* ★★★ 더스티 블루 */
  --cm: 22px;               /* 블록 그림 1cm의 화면 크기 */
  --bs-top: var(--header-h);
  --bs-font: "Jua", var(--font);
}

.bs-title, .bs-h2, .bs-sign span, .bs-num, .bs-shape h3, .bs-total, .bs-talk .h3 { font-family: var(--bs-font); font-weight: 400; }
.bs-title { font-size: 40px; line-height: 1.2; color: var(--bs-ink); }
.bs-h2 { font-size: 28px; line-height: 1.3; color: var(--bs-ink); }
.bs .label { color: var(--bs-accent); }
.bs br.pc { display: none; }
.bs [style*="--h"] { height: calc(var(--h) * var(--cm)); width: auto; filter: drop-shadow(0 6px 6px rgba(60, 40, 10, 0.18)); }

/* ---------- 놀이터 간판 메뉴 (헤더 아래에 붙어 따라와요) ---------- */
.bs-bar {
  position: sticky; top: var(--bs-top); z-index: 40;
  background: var(--bs-ink); color: #fff; transition: top 0.2s;
  /* 나뭇결 느낌의 아주 옅은 줄무늬 */
  background-image: repeating-linear-gradient(100deg, rgba(255,255,255,0.03) 0 6px, transparent 6px 14px);
}
.bs-bar-inner { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.bs-sign { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; flex: 0 0 auto; }
.bs-sign img { width: auto; height: 30px; }
.bs-sign span { font-size: 17px; }
.bs-sign b { font-weight: 400; color: #F3CB74; }
.bs-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.bs-links::-webkit-scrollbar { display: none; }
.bs-links a {
  flex: 0 0 auto; color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 10px; border-radius: 999px; white-space: nowrap;
}
.bs-links a:hover, .bs-links a.is-here { background: rgba(255,255,255,0.16); color: #fff; }
.bs :target, .bs [id^="bs-"] { scroll-margin-top: calc(var(--bs-top) + 64px); }

@media (max-width: 719px) {
  .bs-bar-inner { flex-wrap: wrap; gap: 0; padding-top: 8px; }
  .bs-sign span { font-size: 16px; }
  .bs-links {
    width: calc(100% + 20px); margin: 4px -10px 4px; padding-right: 24px;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
            mask-image: linear-gradient(to right, #000 85%, transparent);
  }
}

/* ---------- 첫 화면 ---------- */
.bs-hero {
  background: var(--bs-cream);
  background-image: radial-gradient(ellipse at 85% 20%, rgba(228,185,94,0.18), transparent 55%),
                    radial-gradient(ellipse at 10% 90%, rgba(169,187,156,0.18), transparent 50%);
  padding: 28px 0 56px; overflow: hidden;
}
.bs-hero-grid { display: grid; gap: 28px; align-items: center; }
.bs-back { display: inline-block; font-size: 14px; color: var(--color-text-sub); text-decoration: none; margin-bottom: 14px; }
.bs-back:hover { color: var(--bs-ink); }
.bs-hero .lead { margin-top: 14px; color: #4A4A4A; }
.bs-hero .btn-primary, .bs-end .btn-primary, .bs-zoom .btn { background: var(--bs-ink); }
.bs-hero .btn-primary:hover, .bs-end .btn-primary:hover { background: #45361A; }
.bs-hero .btn-secondary, .bs-end .btn-secondary { color: var(--bs-ink); border-color: var(--bs-ink); background: transparent; }

.bs-hero-art { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 8px; min-height: 300px; --cm: 18px; }
.bs-stack { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.bs-stack img { margin-top: -6px; animation: bs-drop 0.55s cubic-bezier(.3,1.4,.6,1) both; }
.bs-stack img:nth-child(4) { animation-delay: 0s; }
.bs-stack img:nth-child(3) { animation-delay: 0.15s; }
.bs-stack img:nth-child(2) { animation-delay: 0.3s; }
.bs-stack img:nth-child(1) { animation-delay: 0.45s; }
.bs-fan { position: relative; width: 230px; height: 260px; flex: 0 0 auto; }
.bs-fan img {
  position: absolute; bottom: 0; left: 50%; width: 140px; height: auto; border-radius: 10px;
  box-shadow: 0 10px 24px rgba(60,40,10,0.18); transform-origin: 50% 100%;
  animation: bs-fan 0.6s ease-out both 0.5s;
}
.bs-fan img:nth-child(1) { transform: translateX(-50%) rotate(-14deg); --r: -14deg; }
.bs-fan img:nth-child(2) { transform: translateX(-50%) rotate(0deg); --r: 0deg; z-index: 2; }
.bs-fan img:nth-child(3) { transform: translateX(-50%) rotate(14deg); --r: 14deg; }
@keyframes bs-drop { from { opacity: 0; transform: translateY(-60px); } }
@keyframes bs-fan { from { transform: translateX(-50%) rotate(0deg); opacity: 0; } }

/* ---------- 섹션 공통 ---------- */
.bs-section { padding: 64px 0; }
.bs-tint { background: var(--bs-cream); }
.bs-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--bs-accent); color: #fff; font-size: 18px; line-height: 1;
}

/* ---------- 이렇게 놀아요 ---------- */
.bs-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.bs-point { background: #fff; border: 1px solid #EFE6DA; border-radius: 20px; padding: 18px; position: relative; }
.bs-point .bs-num { position: absolute; top: 14px; left: 14px; z-index: 2; }
.bs-point-art { display: flex; justify-content: center; align-items: flex-end; gap: 8px; min-height: 170px; padding: 6px 0 14px 34px; background: var(--bs-cream); border-radius: 14px; margin-bottom: 14px; }
.bs-point-art img:not([style]) { height: 150px; width: auto; border-radius: 8px; box-shadow: 0 6px 14px rgba(60,40,10,0.14); }
.bs-point-art.blocks { --cm: 26px; align-items: flex-end; }
.bs-point p { margin-top: 6px; color: var(--color-text-sub); }

/* ---------- 블록 7가지 ---------- */
.bs-shapes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bs-shape { background: #fff; border-radius: 18px; padding: 14px; border: 1px solid #EFE6DA; display: flex; flex-direction: column; }
.bs-shape-art { height: calc(8 * 18px + 12px); display: flex; align-items: flex-end; justify-content: center; --cm: 18px; margin-bottom: 10px; }
.bs-shape h3 { font-size: 19px; color: var(--bs-ink); }
.bs-shape h3 b { font-weight: 400; color: var(--bs-accent); margin-left: 2px; }
.bs-shape p { font-size: 13.5px; color: var(--color-text-sub); margin-top: 2px; line-height: 1.5; }
.bs-shape-total { background: var(--lv1); border-color: var(--lv1); justify-content: center; text-align: center; }
.bs-shape-total p { color: var(--lv1-ink); }
.bs-total { font-size: 24px; color: var(--lv1-ink) !important; }
.bs-total b { font-weight: 400; font-size: 56px; color: #fff; display: block; line-height: 1; }

/* ---------- 놀이카드 ---------- */
.bs-filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -2px; }
.bs-filter::-webkit-scrollbar { display: none; }
.bs-filter-btn {
  flex: 0 0 auto; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--bs-ink); background: #fff; border: 1.5px solid #E6DCCB;
}
.bs-filter-btn span { font-weight: 500; color: var(--color-text-sub); margin-left: 2px; }
.bs-filter-btn[aria-pressed="true"] { background: var(--bs-ink); border-color: var(--bs-ink); color: #fff; }
.bs-filter-btn.lv1[aria-pressed="true"] { background: var(--lv1); border-color: var(--lv1); color: var(--lv1-ink); }
.bs-filter-btn.lv2[aria-pressed="true"] { background: var(--lv2); border-color: var(--lv2); color: var(--lv2-ink); }
.bs-filter-btn.lv3[aria-pressed="true"] { background: var(--lv3); border-color: var(--lv3); color: var(--lv3-ink); }
.bs-filter-btn[aria-pressed="true"] span { color: inherit; opacity: 0.75; }
.bs-filter-status { font-size: 13px; color: var(--color-text-sub); min-height: 20px; margin: 4px 0 12px; }

.bs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bs-card { padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; font: inherit; animation: fade 0.25s ease; }
.bs-card[hidden] { display: none; }
.bs-card img { width: 100%; height: auto; aspect-ratio: 90 / 130; border-radius: 8px; box-shadow: 0 4px 12px rgba(60,40,10,0.12); transition: transform 0.15s; }
.bs-card:hover img { transform: translateY(-3px) rotate(-1deg); }
.bs-card span { display: block; font-size: 12.5px; line-height: 1.4; color: #4A4A4A; margin-top: 6px; }

/* ---------- 세로 영상 ---------- */
.bs-videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bs-video { margin: 0; }
.bs-video video { width: 100%; aspect-ratio: 9 / 16; border-radius: 16px; background: #EFE6DA; display: block; object-fit: cover; }
.bs-video figcaption { font-size: 13.5px; color: #4A4A4A; margin-top: 6px; text-align: center; }

/* ---------- 활동지 ---------- */
.bs-sheets { display: grid; gap: 14px; }
.bs-sheet { display: flex; background: #fff; border: 1px solid #EFE6DA; border-radius: 18px; overflow: hidden; }
.bs-sheet-photo { flex: 0 0 120px; padding: 0; border: 0; cursor: zoom-in; background: var(--bs-cream); }
.bs-sheet-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.bs-sheet-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.bs .stars { color: #D9A43F; font-size: 13px; letter-spacing: 1px; }
.bs-sheet-body .h3 { font-size: 16px; }
.bs-sheet-body .sub { font-size: 13.5px; line-height: 1.55; }
.bs-sheet-body .btn { margin-top: auto; min-height: 42px; font-size: 14px; padding: 0 16px; align-self: flex-start; color: var(--bs-ink); border-color: var(--bs-ink); }
.bs-sheet-body .btn:hover { background: var(--bs-tile); }
.bs-all { margin-top: 24px; padding: 20px; border-radius: 18px; background: var(--bs-ink); color: #fff; display: flex; flex-direction: column; gap: 14px; }
.bs-all .sub { color: rgba(255,255,255,0.75); margin-top: 4px; }
.bs-all .btn-primary { background: #F3CB74; color: var(--bs-ink); }
.bs-all .btn-primary:hover { background: #EDB94A; }

/* ---------- 인쇄 · 함께 놀 때 ---------- */
.bs-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.bs-steps li { background: #fff; border-radius: 18px; padding: 20px; border: 1px solid #EFE6DA; }
.bs-steps .h3 { margin-top: 10px; font-size: 17px; }
.bs-steps p { margin-top: 4px; color: var(--color-text-sub); font-size: 15px; }
.bs-talk { margin-top: 20px; background: #fff; border-radius: 20px; padding: 22px; border-left: 6px solid var(--lv2); }
.bs-talk .h3 { font-size: 22px; color: var(--bs-ink); }
.bs-talk ul { margin: 10px 0 12px; padding-left: 18px; line-height: 1.9; font-size: 15.5px; }
.bs-talk b { color: var(--bs-ink); }

/* ---------- 안전 정보 ---------- */
.bs-safety { display: flex; gap: 18px; align-items: center; padding: 20px; border-radius: 18px; border: 1.5px solid #F2C9BC; background: #FFF6F2; }
.bs-safety img { width: 44px; height: auto; flex: 0 0 auto; }
.bs-safety ul { margin: 8px 0 0; padding-left: 18px; font-size: 14.5px; line-height: 1.7; }

/* ---------- 마무리 ---------- */
.bs-end { background: var(--bs-cream); }
.bs-end-blocks { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin-bottom: 18px; --cm: 12px; }

/* ---------- 크게 보기 창 ---------- */
.bs-zoom { border: 0; padding: 16px; border-radius: 20px; width: min(92vw, 520px); max-height: 92vh; background: #fff; text-align: center; }
.bs-zoom::backdrop { background: rgba(40, 28, 10, 0.7); }
.bs-zoom img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; border-radius: 12px; }
.bs-zoom [hidden] { display: none; }
.bs-zoom-caption { font-size: 15px; margin: 10px 0 12px; color: #4A4A4A; }
.bs-zoom-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.92); cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.bs-zoom-close svg { width: 22px; height: 22px; }

/* ---------- 넓은 화면 ---------- */
@media (min-width: 720px) {
  .bs-points { grid-template-columns: repeat(3, 1fr); }
  .bs-shapes { grid-template-columns: repeat(4, 1fr); }
  .bs-cards { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .bs-videos { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .bs-sheets { grid-template-columns: repeat(3, 1fr); }
  .bs-sheet { flex-direction: column; }
  .bs-sheet-photo { flex: none; aspect-ratio: 700 / 760; }
  .bs-sheet-body .btn { width: 100%; align-self: stretch; margin-top: 10px; }
  .bs-steps { grid-template-columns: repeat(3, 1fr); }
  .bs-all { flex-direction: row; align-items: center; justify-content: space-between; padding: 24px 28px; }
}
@media (min-width: 1024px) {
  .bs br.pc { display: inline; }
  .bs-title { font-size: 60px; }
  .bs-h2 { font-size: 40px; }
  .bs-hero { padding: 48px 0 88px; }
  .bs-hero-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; }
  .bs-hero-art { --cm: 24px; min-height: 420px; }
  .bs-fan { width: 320px; height: 340px; }
  .bs-fan img { width: 190px; }
  .bs-section { padding: 104px 0; }
  .bs-cards { grid-template-columns: repeat(6, 1fr); }
  .bs-videos { grid-template-columns: repeat(6, 1fr); }
  .bs-safety { padding: 28px 32px; }
  .bs-safety img { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .bs-stack img, .bs-fan img, .bs-card { animation: none; }
  .bs-bar { transition: none; }
}
