/* 학생 학습 카드 공통 (필수동사 카드, 이후 나의 단어장) — 체험판 카드 화면과 같은 모양 (10/15) */
.study { max-width: 820px; padding-top: 24px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 14px; }
.study-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.study-head h1 { font-family: var(--font-en-title); font-weight: 700; font-size: 28px; margin: 2px 0 0; }
.crumb { color: var(--ink-sub); font-size: 14px; }

.voice { display: inline-flex; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px; font-size: 14px; }
.voice span { padding: 0 8px; color: var(--ink-sub); font-weight: 600; }
.voice button { border: 0; background: transparent; border-radius: 4px; padding: 6px 10px; font: inherit; color: var(--ink-sub); cursor: pointer; min-height: 34px; }
.voice button[aria-pressed="true"] { background: var(--st-strong); color: var(--st-strong-ink); font-weight: 600; }

.levels, .modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px; }
.levels button, .modes button { border: 0; background: transparent; border-radius: 4px; padding: 8px 6px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink-sub); cursor: pointer; min-height: 46px; line-height: 1.25; }
.levels button { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.levels button span { font-family: var(--font-mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.levels button[aria-selected="true"], .modes button[aria-selected="true"] { background: var(--st-strong); color: var(--st-strong-ink); }
@media (max-width: 560px) { .levels, .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.count-line { display: flex; justify-content: flex-end; align-items: baseline; gap: 6px; font-family: var(--font-mono); font-size: 14px; color: var(--ink-sub); }
.count-line b { color: var(--brand-deep); font-size: 16px; font-variant-numeric: tabular-nums; }

.vcard { width: 100%; min-height: 320px; border: 0; border-radius: 8px; padding: 28px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--card-front, var(--st-accent)); color: var(--card-front-ink, var(--st-accent-ink)); transition: background .25s, color .25s, transform .25s; font: inherit; }
.vcard.back { background: var(--card-back, var(--st-strong)); color: var(--card-back-ink, var(--st-strong-ink)); }
.vcard:active { transform: scale(.99); }
.vword { font-family: var(--font-card); font-weight: 600; font-size: clamp(52px, 11vw, 82px);  /* 11/11 Tori: 카드 글씨 살짝 크게, 카드만 Fredoka */ line-height: 1.15; letter-spacing: -.01em; text-align: center; overflow-wrap: anywhere; }
.vword.kr { font-size: clamp(40px, 9vw, 60px); letter-spacing: 0; }
.vword.long { font-size: clamp(34px, 8vw, 52px); }
.vsub { font-size: 20px; font-weight: 500; letter-spacing: .02em; opacity: .9; text-align: center; }
.vtip { font-size: 14px; opacity: .75; }
.vprog { text-align: center; color: var(--ink-sub); font-size: 14px; margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.vactions { display: flex; flex-wrap: wrap; gap: 12px; }
.vactions .btn { flex: 1 1 180px; min-height: 56px; font-size: 18px; }
.vactions .say { flex: 0 0 56px; padding: 0; font-size: 20px; }

.vdone { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vdone-emoji { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; color: var(--brand-deep); }
.vdone h2 { font-family: var(--font-ko-title); font-weight: 800; font-size: 28px; margin: 0; }
.vbig { font-family: var(--font-en-title); font-weight: 700; font-size: 56px; color: var(--brand); font-variant-numeric: tabular-nums; }
.vdone .muted { color: var(--ink-sub); margin: 0; }
.vdone .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.vdone .chips span { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 6px 12px; font-weight: 600; }
.vdone-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.study-head .test-link { margin-left: auto; min-height: 40px; padding: 8px 14px; font-size: 15px; background: var(--card); }

/* [패턴묶음] 10/26: 단계별 / 불규칙 패턴 보기 */
.views { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; align-self: flex-start; }
.views button { border: 0; background: transparent; border-radius: 4px; padding: 8px 16px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink-sub); cursor: pointer; min-height: 40px; }
.views button[aria-selected="true"] { background: var(--ink); color: var(--card); }
.levels.pat button em { font-style: normal; font-family: var(--font-mono); font-size: 11px; font-weight: 500; opacity: .85; }
.pinfo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pinfo p { margin: 0; color: var(--ink-sub); font-size: 15px; }
.pinfo .btn { min-height: 40px; padding: 8px 16px; font-size: 15px; background: var(--card); }
.vtag { font-family: var(--font-mono); font-size: 14px; opacity: .8; letter-spacing: .02em; }
.pover { display: flex; flex-direction: column; gap: 12px; }
.pgroup { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.pgroup h3 { margin: 0 0 8px; font-family: var(--font-mono); font-size: 15px; color: var(--brand-deep); }
.pgroup ul { list-style: none; margin: 0; padding: 0; }
.pgroup li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.pgroup li:first-child { border-top: 0; }
.pforms { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 18px; }
.pforms b { font-weight: 600; }
.pforms i { font-style: normal; color: var(--ink-sub); }
.pko { flex: 0 1 40%; color: var(--ink-sub); font-size: 15px; text-align: right; }
.pgroup .say { flex: 0 0 40px; min-height: 40px; padding: 0; }
@media (max-width: 560px) { .pgroup li { flex-wrap: wrap; } .pko { flex-basis: auto; text-align: left; order: 3; width: 100%; } .pforms { font-size: 18px; } }

/* 11/2 Tori: 위 바 2개(단계·방식) 작게 + 카드 · 바 · 알아요/몰라요가 휴대폰 한 화면에 */
.study { gap: 10px; padding-top: 10px; }
.study-head h1 { font-size: 22px; }
.views button { min-height: 32px; padding: 5px 12px; font-size: 14px; }
.levels, .modes { gap: 4px; padding: 4px; }
.levels button, .modes button { min-height: 34px; padding: 4px 4px; font-size: 14px; }
.levels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.levels button span { font-size: 11px; }
.vtest-link { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.vtest-link:hover { border-color: var(--brand); }
@media (max-width: 560px) {
  .levels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .levels button { font-size: 12.5px; min-height: 40px; }
  .modes button { min-height: 32px; font-size: 12.5px; }
  .vcard { min-height: 230px; padding: 20px; }
  .vactions { gap: 8px; }
  .vactions .btn { min-height: 50px; flex-basis: 120px; }
  .count-line { margin-top: -2px; }
}
.vh-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vh-title h1 { margin: 0; }
@media (max-width: 560px) { .vactions .say { flex: 0 0 50px; } .vactions { flex-wrap: nowrap; } }

/* 11/2 Tori: 단계 바도 한 줄(「필수 (0/200)」) · 두 바 같은 크기 · 바 사이 간격 좁게 */
.levels:not(.pat) button { flex-direction: row; justify-content: center; gap: 4px; white-space: nowrap; }
.levels button, .modes button { min-height: 36px; font-size: 14px; }
.levels:not(.pat) button span { font-size: 13px; font-weight: 600; opacity: .85; }
#levels + .pinfo[hidden] + #modes, #levels + #modes { margin-top: -6px; }
.study #modes { margin-top: -6px; }
@media (max-width: 560px) {
  .levels:not(.pat), .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .levels button, .modes button { min-height: 34px; font-size: 12.5px; }
}
/* 11/11 Tori: 단계 탭 4번째 칸 = 동사 테스트 (색 다르게, 누르면 테스트 페이지로) */
.levels .lv-test { font-size: 15px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--apricot-soft); color: var(--apricot-deep); text-decoration: none; font-weight: 700; min-height: 36px; padding: 4px 6px; white-space: nowrap; }
.levels .lv-test:hover { background: var(--apricot); color: var(--ink); }
.levels .lv-test b { font-weight: 700; }
@media (max-width: 620px) { .levels .lv-test { font-size: 14px; } }
/* 11/16 [오늘의 복습] 복습 카드는 테두리 색만 다르게 */
.vcard.review { border-color: var(--apricot); box-shadow: 0 0 0 3px var(--apricot-soft) inset; }
.vhint { margin: 8px 0 0; text-align: center; font-size: 14px; color: var(--ink-sub); }

/* 11/18 저장 실패 안내 띠 (verbs.js saveBar) */
.save-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 8px 0; padding: 10px 14px; border-radius: 12px; background: var(--apricot-soft); border: 1px solid var(--line); color: var(--ink); font-size: 15px; }
.save-bar .btn { padding: 6px 12px; font-size: 14px; }
/* 카드 뒷면 예문: 영어와 해석은 함께, 듣기는 카드 밖의 독립 버튼 */
.vexample { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; text-align: center; }
.vexample[hidden] { display: none; }
.vexample-en { font-family: var(--font-en-text); font-size: 18px; line-height: 1.35; font-weight: 400; overflow-wrap: anywhere; }
.vexample-en strong { font-weight: 800; }
.vexample-ko { font-family: var(--font-body); font-size: 14px; line-height: 1.4; font-weight: 400; overflow-wrap: anywhere; }
.vexample-say { display: block; margin: 6px 0 6px auto; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.vexample-say:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 3px; }
@media (max-width: 560px) {
  .vcard.back { padding: 16px 12px; gap: 10px; }
  .vexample-en { font-size: 17px; }
  .vexample-ko { font-size: 13px; }
}

/* [익히기] 11/23 — 익히기 탭(맨 위 한 줄) · 자동 발음 켜고 끄기 */
.say-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.auto-say { border: 1px solid var(--line); background: var(--card); color: var(--ink-sub); border-radius: 6px; padding: 6px 12px; min-height: 44px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.auto-say[aria-pressed="true"] { background: #FFF4D6; border-color: #F2C94C; color: #7A5A00; }
.modes .learn-tab { grid-column: 1 / -1; background: #FFF4D6; color: #7A5A00; }
.modes .learn-tab[aria-selected="true"] { background: #F2B82C; color: #3D2A00; }
.vcard.learn:not(.back) { box-shadow: inset 0 0 0 4px #F2C94C; }
.vcard.learn + .vactions { margin-top: 14px; }

/* =========================================================
   11/23 Tori: 학습 화면이 조잡함 · 카드가 화면 밖으로 밀림 → 위 버튼 줄을 얇게 (휴대폰 · 태블릿 · 노트북 모두)
   - 단계별/패턴 + 단계 = 한 줄 칩 (넘치면 옆으로 밀기) · 방식도 한 줄 칩
   ========================================================= */
.study { gap: 10px; padding-top: 14px; }
.tabrow { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tabrow::-webkit-scrollbar, .modes::-webkit-scrollbar { display: none; }
.tabrow .views { flex: none; padding: 3px; }
.tabrow .views button { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.tabrow .levels { flex: none; display: flex; gap: 4px; padding: 3px; }
.tabrow .levels button, .tabrow .levels .lv-test { flex: none; flex-direction: row; gap: 4px; min-height: 36px; padding: 6px 12px; font-size: 14px; white-space: nowrap; }
.tabrow .levels button span { font-size: 12px; }
.tabrow .levels .lv-test { display: inline-flex; align-items: center; border-radius: 4px; }
.tabrow .levels .lv-test b { font-size: 14px; }
.modes { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 3px; }
.modes button { flex: none; min-height: 38px; padding: 6px 12px; font-size: 14px; white-space: nowrap; }
.modes .learn-tab { grid-column: auto; }
.pinfo:not([hidden]) { padding: 10px 14px; }
.count-line { font-size: 13px; }
.vactions .btn { min-height: 52px; }
@media (min-width: 700px) {   /* 태블릿 · 노트북: 칩이 다 들어가면 가운데 정렬 없이 왼쪽부터, 카드는 넉넉하게 */
  .vcard { min-height: clamp(240px, 38vh, 380px); }
}
@media (max-width: 560px) {
  .study { padding-top: 10px; gap: 8px; }
  .study-head { align-items: center; gap: 8px; }
  .study-head h1 { font-size: 22px; }
  .crumb { font-size: 13px; }
  .say-tools { gap: 6px; }
  .voice { padding: 2px; font-size: 13px; }
  .voice span { display: none; }
  .voice button { min-height: 32px; padding: 4px 9px; }
  .auto-say { min-height: 36px; padding: 4px 10px; font-size: 13px; }
  .auto-say .as-long { display: none; }
  .vcard { min-height: 230px; padding: 20px; }
  .vword { font-size: clamp(46px, 13vw, 64px); }
  .guest-bar .wrap { padding: 6px 14px; font-size: 13px; flex-wrap: nowrap; }
  .guest-bar .gb-long { display: none; }
  .guest-bar a { padding: 4px 10px; }
}
@media (max-width: 560px) {   /* 11/23 제목 줄: 「← 학습실」과 제목을 한 줄로, 버튼 글자 한 줄 */
  .study-head > div:first-child { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .study-head .crumb { white-space: nowrap; }
  .study-head .vh-title h1 { font-size: 20px; margin: 0; white-space: nowrap; }
  .vactions { gap: 8px; }
  .vactions .btn { flex: 1 1 0; min-width: 0; font-size: 16px; white-space: nowrap; padding: 0 8px; }
  .vactions .say { flex: 0 0 52px; }
}

/* 11/23 Tori: 공부 화면에서는 발음(미국 · 영국 · 번갈아) · 자동 발음 버튼 숨김 — 휴대폰에서 너무 눈에 띔.
   바꾸고 싶으면 학습실 「나」 → 발음 에서 (자동 발음은 기본 켜짐, 발음은 기본 번갈아) */
.study-head .say-tools, .study-head > .voice { display: none; }
/* 체험 학습실 첫 화면에서 「← 체험 학습실」 숨김 (위 메뉴 · 아래 이전/처음 버튼으로 이동) — 안쪽 화면의 「← 구동사」 같은 건 그대로 */
.crumb[href="/try/"] { display: none; }
