/* =================================================================
   chocolab.co.kr 첫 화면 (2026-11-19 새로) — home.css(로그인 창·알약 단추) 위에 덮어쓴다.
   벤처랩과 같은 색: 흰 바탕 + 파스텔. 버튼 = 그림 + 기능 이름만.
   ================================================================= */
:root {
  --bg: #FFFFFF; --soft: #F6F7FB; --line: #E9E6F0; --ink: #2B2730; --ink-2: #4F4A5A; --ink-3: #8A8597;
  --pink: #FFD9E6;   --pink-g: #FFB8D0;   --pink-ink: #B33C68;
  --mint: #D6F3E8;   --mint-g: #A8E6CF;   --mint-ink: #1F7A5F;
  --lav: #E7E1FF;    --lav-g: #C9BCFF;    --lav-ink: #5B47B8;
  --peach: #FFE6D3;  --peach-g: #FFC9A3;  --peach-ink: #A65A1E;
  --sky: #DDEBFF;    --sky-g: #B3D1FF;    --sky-ink: #2F61B5;
  --yellow: #FFF1C7; --yellow-g: #FFE08A; --yellow-ink: #8A6400;
  --gray: #ECEBF1;   --gray-g: #D9D6E2;
  --r: 22px;
  --f-title: 'Pretendard Variable', Pretendard, 'Noto Sans KR', sans-serif;
  --f-body: 'Pretendard Variable', Pretendard, 'Noto Sans KR', system-ui, sans-serif;
}
body { background: var(--bg); background-image: none; font-family: var(--f-body); font-size: 17px; color: var(--ink); line-height: 1.5; }
main { flex: 1; }
/* 로그인 확인 중: 초코만 살짝 (0.4초 넘게 걸릴 때만 보인다) */
.wait { display: flex; align-items: center; justify-content: center; min-height: 52vh; }
.wait[hidden] { display: none; }
.wait img { width: 72px; height: 72px; object-fit: contain; opacity: 0; animation: waitIn .3s .4s forwards, waitBob 1.2s .7s ease-in-out infinite; }
@keyframes waitIn { to { opacity: .55; } }
@keyframes waitBob { 50% { transform: translateY(-6px); } }
.wrap { max-width: 1080px; }

/* ---------- 머리 ---------- */
.top { background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--line); }
.top .wrap { height: 70px; justify-content: flex-start; }
.brand { cursor: pointer; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand b { font-family: var(--f-title); font-weight: 800; font-size: 23px; letter-spacing: -.02em; }
.vnav { display: flex; gap: 6px; margin-left: 18px; }
.vnav a { padding: 9px 16px; border-radius: 999px; font-weight: 800; color: var(--ink-2); text-decoration: none; }
.vnav a.on { background: var(--ink); color: #fff; }
.vnav a:not(.on):hover { background: var(--soft); }
.spacer { flex: 1; }
.who .name { font-size: 16px; }
.pill { font-size: 16px; font-family: var(--f-body); }

/* ---------- 버튼 타일: 흰 칸 + 파스텔 그림 상자 + 파스텔 빛 ---------- */
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 22px 12px 18px;
  text-align: center; text-decoration: none; color: var(--ink); cursor: pointer;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--g) 28%, transparent), 0 14px 30px -12px var(--g);
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 0 0 7px color-mix(in srgb, var(--g) 40%, transparent), 0 18px 34px -10px var(--g); }
.tile .ic { width: 96px; height: 96px; border-radius: 24px; padding: 8px; background: var(--c); }
.tile .ic img { width: 100%; height: 100%; object-fit: contain; }
.tile b { font-size: 18px; line-height: 1.3; }
.tile.off { cursor: default; box-shadow: none; opacity: .5; }
.tile.off:hover { transform: none; }
.badge { position: absolute; top: 10px; right: 10px; font-size: 13px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--gray); color: var(--ink-3); }
.badge.rv { background: var(--yellow); color: var(--yellow-ink); }
.check { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #fff; }
.tile.sel { border-color: var(--ink); }
.tile.sel .check { background: var(--ink); border-color: var(--ink); }
.fmts { display: flex; gap: 4px; margin-top: -4px; }
.fb { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: var(--ink-2); border: 1.5px solid var(--line); border-radius: 10px; padding: 5px 4px 3px; min-width: 40px; background: #fff; text-decoration: none; white-space: nowrap; }
.fb:hover { border-color: var(--ink-3); }
.fi { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: #fff; font-style: normal; font-weight: 900; font-size: 14px; }
.f-hwpx { background: #2F7BEA; } .f-word { background: #2B579A; } .f-md { background: #4F4A5A; }

/* 스티커 (학습도우미 '논술 OPEN' 등) — 비스듬히 붙인 스티커처럼 */
.stk { position: absolute; top: -14px; left: -12px; z-index: 2; transform: rotate(-12deg);
  background: var(--pink-ink); color: #fff; font-size: 14px; font-weight: 900; letter-spacing: .02em; white-space: nowrap;
  padding: 6px 12px; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(179, 60, 104, .35); }
.tile:hover .stk { transform: rotate(-6deg) scale(1.06); }

/* ---------- 첫 화면 (로그인 전) ---------- */
.hb-hero { text-align: center; padding: 44px 0 26px; }
.hb-hero img.main { width: 200px; height: 200px; margin: 0 auto 6px; object-fit: contain; }
.hb-hero h1 { font-family: var(--f-title); font-size: 58px; line-height: 1.15; letter-spacing: -.04em; margin: 0 0 26px; }
.hb-hero h1 small { display: block; font-size: 27px; color: var(--ink-2); font-weight: 700; letter-spacing: -.02em; }
.go-google { display: inline-flex; align-items: center; gap: 12px; border: 0; border-radius: 18px; padding: 18px 34px; background: var(--ink); color: #fff; font-size: 20px; font-weight: 800; cursor: pointer; }
.go-google svg { width: 22px; height: 22px; }
.hello { margin: 0; font-family: var(--f-title); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.hello[hidden], .go-google[hidden] { display: none; }
.notice { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--pink); color: var(--pink-ink); text-decoration: none; border-radius: 999px; padding: 14px 26px; margin: 6px auto 40px; font-size: 20px; font-weight: 800; max-width: 640px; }
.notice:hover { background: var(--pink-g); }
.notice i { font-style: normal; background: #fff; border-radius: 999px; padding: 3px 12px; font-size: 16px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin: 0 0 64px; padding: 6px; }
.three .tile .ic { width: 120px; height: 120px; border-radius: 28px; }
.three .tile b { font-size: 21px; }

/* ---------- 공통 머리글 ---------- */
.page-t { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 34px 0 22px; }
.page-t h1 { font-family: var(--f-title); font-size: 30px; letter-spacing: -.03em; margin: 0; }
.page-t img { width: 60px; height: 60px; object-fit: contain; }
.crd { font-size: 15px; font-weight: 700; background: var(--mint); color: var(--mint-ink); border-radius: 999px; padding: 6px 14px; }
.count { font-weight: 800; background: var(--soft); border-radius: 999px; padding: 6px 14px; font-size: 15px; }

/* ---------- 학습도우미 ---------- */
.lrow { display: grid; grid-template-columns: 1.15fr repeat(4, 1fr); gap: 20px; margin-bottom: 34px; padding: 6px; }
.intro { border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.intro img { width: 130px; height: 130px; object-fit: contain; }
.intro b { font-size: 24px; letter-spacing: -.02em; }

/* ---------- 도구함 ---------- */
.grp { margin-bottom: 30px; }
.grp h2 { font-size: 21px; margin: 0 0 14px; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; padding: 6px; }
.grid .tile .ic { width: 80px; height: 80px; border-radius: 20px; }
.grid .tile b { font-size: 16px; }

/* ---------- 대시보드 ---------- */
.widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 6px; margin-bottom: 40px; }
.w {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px 18px; min-height: 170px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; position: relative; cursor: grab;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--g) 22%, transparent), 0 14px 30px -14px var(--g);
  text-decoration: none; color: var(--ink);
}
.w.drag { opacity: .4; }
.w.over { outline: 3px dashed var(--ink-3); outline-offset: 4px; }
.w .ic { width: 84px; height: 84px; border-radius: 22px; padding: 6px; background: var(--c); }
.w .ic img { width: 100%; height: 100%; object-fit: contain; }
.w b { font-size: 19px; }
.w .x { position: absolute; top: 10px; right: 10px; border: 0; background: var(--soft); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; color: var(--ink-3); font-size: 18px; line-height: 1; }
.w.add { border-style: dashed; box-shadow: none; color: var(--ink-3); font-weight: 800; font-size: 18px; cursor: pointer; background: var(--soft); }
.w.add span { font-size: 40px; line-height: 1; }

/* ---------- 별명 받기 ---------- */
dialog.nick { border: 0; border-radius: 28px; padding: 30px 28px 26px; width: min(380px, 92vw); text-align: center;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--lav-g) 35%, transparent), 0 24px 60px -20px rgba(43, 39, 48, .4); }
dialog.nick::backdrop { background: rgba(43, 39, 48, .35); }
dialog.nick img { width: 110px; height: 110px; margin: 0 auto 6px; object-fit: contain; }
dialog.nick h2 { font-size: 24px; margin: 0 0 16px; letter-spacing: -.03em; }
dialog.nick input { width: 100%; font: inherit; font-size: 20px; text-align: center; padding: 14px; border: 2px solid var(--line); border-radius: 16px; outline: 0; }
dialog.nick input:focus { border-color: var(--lav-ink); }
dialog.nick .nmsg { min-height: 22px; margin: 8px 0; color: var(--pink-ink); font-weight: 700; font-size: 15px; }
dialog.nick .go-google { width: 100%; justify-content: center; }

/* ---------- 아래 줄 ---------- */
.ft { border-top: 1px solid var(--line); margin-top: 30px; padding: 30px 0 40px; color: var(--ink-3); }
.ft .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.acad { display: flex; flex-direction: column; gap: 2px; }
.acad b { font-size: 26px; font-weight: 900; letter-spacing: -.03em; color: var(--ink);
  text-shadow: 0 1px 0 #E3DDEB, 0 2px 0 #D6CFE0, 0 3px 0 #C9C1D6, 0 6px 10px rgba(43, 39, 48, .18); }
.acad a { font-size: 20px; font-weight: 800; color: var(--ink-2); text-decoration: none; }
.ft .links { display: flex; gap: 16px; font-size: 16px; flex-wrap: wrap; }
.ft .links a { color: var(--ink-3); text-decoration: none; }

@media (max-width: 900px) {
  .hb-hero h1 { font-size: 44px; }
  .hb-hero img.main { width: 160px; height: 160px; }
  .three { gap: 14px; }
  .three .tile .ic { width: 84px; height: 84px; }
  .three .tile b { font-size: 17px; }
  .lrow { grid-template-columns: repeat(2, 1fr); }
  .lrow .intro { grid-column: 1 / -1; flex-direction: row; }
  .lrow .intro img { width: 90px; height: 90px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .widgets { grid-template-columns: 1fr 1fr; }
  .vnav { margin-left: 8px; }
  .vnav a { padding: 8px 10px; font-size: 15px; }
  .brand b { display: none; }
}
@media (max-width: 560px) {
  .three { grid-template-columns: 1fr; }
  .three .tile { flex-direction: row; justify-content: flex-start; padding: 14px 18px; }
  .notice { font-size: 17px; }
  .vnav a { padding: 7px 8px; font-size: 14px; }
  /* 폰: 도구함 3칸이면 'PDF →' 형식 단추 때문에 오른쪽 칸이 화면 밖으로 밀렸다 (2026-11-19) → 2칸 */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
