/* ============================================================
   전자책(/books/claude-youtube-agent) 머리 - 2026-11-21 디자인 시안
   참고: sairakhan.design 첫 화면(컴퓨터 바탕화면: 위 메뉴 줄과 시각, 창, 오른쪽 폴더, 아래 독)
   이 쪽에서만 불러온다(메타 css). 바탕은 남색이 살짝 물든 숯색(순검정 아님).
   터미널 창 안의 글자만 고정폭 시스템 글꼴을 쓰고, 한글은 나눔고딕으로 넘어간다.
   1001px 아래(태블릿·휴대폰)는 작은 바탕화면을 만들지 않고 휴대폰 첫 화면처럼 쌓는다.
   ============================================================ */

.eb-desk {
  --eb-gold: #C9A961;
  --eb-win: #232631;
  --eb-win-bar: #2C303C;
  --eb-line: rgba(255,255,255,.10);
  --eb-mono: Consolas, "Cascadia Mono", "SF Mono", Menlo, ui-monospace, "Nanum Gothic", monospace;
  position: relative; overflow: hidden;
  color: var(--on-dark-mid);
  background:
    radial-gradient(55% 60% at 8% 30%, rgba(46, 65, 128, .34) 0%, rgba(46, 65, 128, 0) 70%),
    radial-gradient(40% 45% at 92% 85%, rgba(201, 169, 97, .10) 0%, rgba(201, 169, 97, 0) 70%),
    linear-gradient(180deg, #1A1D27 0%, #181A23 100%);
  padding-bottom: var(--s6);
}
.eb-desk :focus-visible { outline-color: var(--eb-gold); }

/* ---- 위 메뉴 줄 ---- */
.eb-bar { background: rgba(255,255,255,.055); border-bottom: 1px solid rgba(255,255,255,.07); }
.eb-bar-in { display: flex; align-items: center; gap: var(--s5); height: 32px; font-size: 13.5px; line-height: 1; }
.eb-bar-name { color: var(--on-dark); font-weight: 800; }
.eb-bar-menu { display: flex; gap: var(--s5); }
.eb-bar-menu a { color: var(--on-dark-mid); text-decoration: none; padding: 6px 0; }
.eb-bar-menu a:hover { color: var(--on-dark); }
.eb-clock { margin-left: auto; color: var(--on-dark); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.eb-clock span + span { margin-left: .6em; }

/* ---- 바탕화면 ---- */
.eb-in { position: relative; }
.eb-kick { margin: 0 0 var(--s4); line-height: 1.2; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--eb-gold); }
.eb-text h1 {
  color: var(--on-dark);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.3; letter-spacing: -.035em; font-weight: 800;
}
.eb-sub { margin: var(--s4) 0 0; font-size: 16px; font-weight: 700; color: var(--eb-gold); }
.eb-lead { margin: var(--s4) 0 0; font-size: 16.5px; line-height: 1.8; color: var(--on-dark-mid); }
.eb-text .btn-row { margin-top: var(--s5); }
.eb-desk .btn { border-radius: 10px; }
.eb-btn-main { background: var(--eb-gold); border-color: var(--eb-gold); color: var(--navy-deep); }
.eb-btn-main:hover { background: #D9BC7E; border-color: #D9BC7E; }
.eb-btn-line { background: rgba(255,255,255,.04); color: var(--on-dark); border-color: rgba(255,255,255,.28); }
.eb-btn-line:hover { border-color: var(--on-dark); background: rgba(255,255,255,.08); }

/* 창 */
.eb-win {
  margin: 0; border-radius: 12px; overflow: hidden;
  background: var(--eb-win);
  box-shadow: 0 0 0 1px var(--eb-line), 0 28px 70px rgba(0, 0, 0, .45);
}
.eb-win-bar { position: relative; display: flex; align-items: center; height: 34px; padding: 0 var(--s4); background: var(--eb-win-bar); border-bottom: 1px solid rgba(0,0,0,.25); }
.eb-lights { display: inline-flex; gap: 7px; }
.eb-lights i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.eb-lights i:nth-child(2) { background: #FEBC2E; }
.eb-lights i:nth-child(3) { background: #28C840; }
.eb-win-title { position: absolute; left: 76px; right: 76px; text-align: center; font-size: 12.5px; font-weight: 700; color: #A9AFBE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 터미널 - 책 차례 */
.eb-term-body {
  margin: 0; padding: 14px 18px 16px; list-style: none;
  height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
  font-family: var(--eb-mono); font-size: 13px; line-height: 1.75; color: #D7DBE5;
  word-break: keep-all;
  /* 위로 밀려 올라간 줄이 칼로 자른 듯 보이지 않게 위쪽만 살짝 흐리게 */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px);
          mask-image: linear-gradient(180deg, transparent 0, #000 22px);
}
.eb-term-body li { white-space: pre-wrap; padding-left: 2.2em; text-indent: -2.2em; }
.eb-t-ps { color: var(--eb-gold); font-weight: 700; }
.eb-t-cmd { color: #FFFFFF; margin-bottom: 6px; }
.eb-t-part { margin-top: 8px; color: #FFFFFF; font-weight: 700; }
.eb-t-part::before { content: "●  "; color: var(--eb-gold); }
.eb-term-body .eb-t-ch { padding-left: 3.2em; text-indent: 0; position: relative; }
.eb-t-ch::before { content: ""; position: absolute; left: 1.35em; top: .62em; width: .62em; height: .34em; border-left: 2px solid #8FCB9B; border-bottom: 2px solid #8FCB9B; transform: rotate(-45deg); }
.eb-t-app { margin-top: 8px; color: #FFFFFF; font-weight: 700; }
.eb-t-app::before { content: "●  "; color: #8E99BC; }
.eb-t-cur { margin-top: 8px; }
.eb-caret { display: inline-block; width: .6em; height: 1.15em; vertical-align: -.2em; background: #D7DBE5; animation: eb-blink 1.1s steps(1) infinite; }
@keyframes eb-blink { 50% { opacity: 0; } }
/* 스크립트가 한 줄씩 보여 주는 동안 아직 안 나온 줄 */
.eb-term.is-typing .eb-term-body li:not(.is-shown) { display: none; }
.eb-term.is-typing .eb-term-body { overflow: hidden; }

/* 표지 창 */
.eb-cover img { display: block; width: 100%; height: auto; }
.eb-cover .eb-win-title { left: 76px; right: 10px; text-align: left; }

/* 폴더 */
.eb-folders { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s3); }
.eb-folders a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: var(--s2) var(--s1); border-radius: 8px;
  color: var(--on-dark); text-decoration: none; text-align: center;
  font-size: 12.5px; font-weight: 700; line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.eb-folders a:hover { background: rgba(255,255,255,.07); }
.eb-fold {
  width: 60px; height: 48px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 48'%3E%3Cpath fill='%234F73C9' d='M4 6a4 4 0 0 1 4-4h14l5 5h25a4 4 0 0 1 4 4v3H4z'/%3E%3Crect fill='%236E91E0' x='2' y='11' width='56' height='35' rx='4'/%3E%3Crect fill='%23FFFFFF' fill-opacity='.18' x='2' y='11' width='56' height='2' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.eb-fold--zip {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 48'%3E%3Cpath fill='%23A8894A' d='M4 6a4 4 0 0 1 4-4h14l5 5h25a4 4 0 0 1 4 4v3H4z'/%3E%3Crect fill='%23C9A961' x='2' y='11' width='56' height='35' rx='4'/%3E%3Cpath fill='%23F5ECD6' d='M28 11h4v4h-4zm0 6h4v4h-4zm0 6h4v4h-4z'/%3E%3C/svg%3E");
}

/* 독 */
.eb-dock {
  position: relative; z-index: 2;
  display: flex; align-items: flex-start; justify-content: center; gap: var(--s3);
  width: max-content; max-width: calc(100% - 48px);
  margin: var(--s6) auto 0; padding: 10px 16px 8px;
  border-radius: 22px;
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 18px 40px rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.eb-app { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; color: var(--on-dark-mid); text-decoration: none; font-size: 11.5px; font-weight: 700; line-height: 1.3; text-align: center; }
.eb-app span {
  width: 46px; height: 46px; border-radius: 12px;
  background: #343846 center / 24px 24px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
  transition: transform .15s ease;
}
.eb-app:hover { color: var(--on-dark); }
.eb-app:hover span { transform: translateY(-3px); }
.eb-dock-sep { align-self: stretch; width: 1px; margin: 4px 2px 18px; background: rgba(255,255,255,.18); }
.eb-app--buy span  { background-color: var(--eb-gold); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F1A3D' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 12H6z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E"); }
.eb-app--book span { background-color: #34498F; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 5.5c3-1.3 6-1.3 9 .5 3-1.8 6-1.8 9-.5V19c-3-1.3-6-1.3-9 .5-3-1.8-6-1.8-9-.5z'/%3E%3Cpath d='M12 6v13.5'/%3E%3C/svg%3E"); }
.eb-app--list span { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E6E9F0' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Ccircle cx='4.5' cy='6' r='1' fill='%23E6E9F0'/%3E%3Ccircle cx='4.5' cy='12' r='1' fill='%23E6E9F0'/%3E%3Ccircle cx='4.5' cy='18' r='1' fill='%23E6E9F0'/%3E%3C/svg%3E"); }
.eb-app--faq span  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E6E9F0' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 0 1 4.6 1.3c0 1.7-2.1 2-2.1 3.4'/%3E%3Ccircle cx='12' cy='17.2' r='.6' fill='%23E6E9F0'/%3E%3C/svg%3E"); }
.eb-app--talk span { background-color: #FEE500; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233A1D1D' d='M12 4C7 4 3 7.1 3 11c0 2.5 1.7 4.7 4.2 5.9l-.9 3.3c-.1.3.3.6.6.4l3.9-2.6c.4 0 .8.1 1.2.1 5 0 9-3.1 9-7S17 4 12 4z'/%3E%3C/svg%3E"); }
.eb-app--tel span  { background-color: #2FA65A; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFFFFF' d='M6.6 3.5l2.6-.6 1.6 4.1-2 1.4a12 12 0 0 0 6.8 6.8l1.4-2 4.1 1.6-.6 2.6c-.2.9-1 1.5-1.9 1.4C10.4 18.4 5.6 13.6 5.2 5.4c0-.9.5-1.7 1.4-1.9z'/%3E%3C/svg%3E"); }
.eb-app--mail span { background-color: #4D6FC4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2'/%3E%3Cpath d='M3.5 6.5l8.5 6.5 8.5-6.5'/%3E%3C/svg%3E"); }

/* ---- 넓은 화면: 창을 겹쳐 놓는 바탕화면 ---- */
@media (min-width: 1101px) {
  .eb-in { min-height: 640px; }
  .eb-text { position: relative; z-index: 1; width: 46%; padding-top: 64px; }
  /* 절대 위치는 안쪽 여백(24px)까지 포함한 상자 기준이라, 글 시작선과 맞추려면 24px 을 더하고 폭은 48px 을 뺀 값으로 잰다 */
  .eb-term { position: absolute; z-index: 1; top: 64px; left: calc(24px + (100% - 48px) * .49); width: calc((100% - 48px) * .51 - 136px); }
  .eb-cover { position: absolute; z-index: 2; top: 362px; right: 148px; width: 160px; }
  .eb-folders { position: absolute; z-index: 1; top: 56px; right: 24px; width: 96px; }
}

/* ---- 좁은 화면: 휴대폰 첫 화면처럼 쌓기 ---- */
@media (max-width: 1100px) {
  .eb-text { max-width: 44em; }
  .eb-in {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s5) var(--s3);
    padding-top: var(--s7);
  }
  .eb-text { grid-column: 1 / -1; }
  /* 표지는 위젯처럼 두 칸 × 두 줄, 폴더는 나머지 칸에 앱처럼 */
  .eb-cover { grid-column: 1 / span 2; grid-row: 2 / span 2; align-self: start; border-radius: 18px; }
  .eb-cover .eb-win-bar { display: none; }
  .eb-folders { display: contents; }
  .eb-folders li { min-width: 0; }
  .eb-folders li:nth-child(5) { display: none; }
  .eb-folders a { font-size: 12px; padding: 0; }
  .eb-fold { width: 56px; height: 46px; }
  .eb-term { grid-column: 1 / -1; grid-row: 4; }
  .eb-folders li:nth-child(1) { grid-column: 3; grid-row: 2; }
  .eb-folders li:nth-child(2) { grid-column: 4; grid-row: 2; }
  .eb-folders li:nth-child(3) { grid-column: 3; grid-row: 3; }
  .eb-folders li:nth-child(4) { grid-column: 4; grid-row: 3; }
  .eb-term-body { height: 300px; font-size: 12.5px; }
  .eb-dock { gap: var(--s2); padding: 10px 12px 8px; border-radius: 26px; }
}
@media (min-width: 601px) and (max-width: 1100px) {
  .eb-in { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .eb-term { grid-column: 5 / -1; grid-row: 2 / span 2; align-self: start; }
  .eb-term-body { height: 280px; }
}
@media (max-width: 600px) {
  .eb-bar-menu, .eb-clock-d { display: none; }
  .eb-bar-name { font-size: 12.5px; }
  .eb-bar-in { justify-content: space-between; }
  .eb-clock { margin-left: 0; order: -1; }
  .eb-text h1 { font-size: clamp(23px, 6.4vw, 30px); }
  .eb-app--list, .eb-app--faq, .eb-app--mail, .eb-dock-sep { display: none; }
  .eb-app { width: 66px; }
  .eb-dock { width: calc(100% - 48px); justify-content: space-around; }
}
@media (max-width: 420px) { .eb-text .btn { flex: 1 1 100%; } }


/* ---------- 11-27 신한 스타일 머리(styles.css 끝 '안쪽 쪽' 참고)
   제목 묶음은 흰 바탕 가운데(.sub-top)로 나가고, 바탕화면(메뉴 줄·창·폴더·독)은 내리면 넓어지는 둥근 판(.sub-card) 안 화면(.eb-screen)이 된다.
   판은 24px 안쪽에서 잘리므로 화면에 좌우 24px 을 더 두고(휴대폰 4px), 안의 창 위치 계산(컨테이너 24px 기준)은 그대로 둔다 ---------- */
.eb-desk.sub-hero { overflow: visible; padding-bottom: 0; color: var(--text-mid); background: var(--white); }
.eb-screen {
  position: relative; color: var(--on-dark-mid);
  padding: 0 24px var(--s6);
  background:
    radial-gradient(55% 60% at 8% 30%, rgba(46, 65, 128, .34) 0%, rgba(46, 65, 128, 0) 70%),
    radial-gradient(40% 45% at 92% 85%, rgba(201, 169, 97, .10) 0%, rgba(201, 169, 97, 0) 70%),
    linear-gradient(180deg, #1A1D27 0%, #181A23 100%);
}
.eb-screen > .eb-bar { margin: 0 -24px; padding: 0 24px; }
.eb-screen .eb-lead { margin-top: 0; font-size: clamp(17px, 1.5vw, 19px); color: #fff; }
@media (max-width: 760px) {
  .eb-screen { padding-inline: 4px; }
  .eb-screen > .eb-bar { margin-inline: -4px; padding-inline: 4px; }
}
