/* english.css — 영어 전용 공용 스타일: 예문 블록, 듣기 버튼, 배열 영작, 지문 도구, 홈 루틴 */

/* ---------- 영어 글꼴: 읽기 좋은 라틴 문자 ---------- */
:root { --font-en: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
[lang="en"], .eng__en, .q__passage { font-feature-settings: "kern"; hyphens: manual; }

/* ---------- 듣기 버튼 ---------- */
.saybtn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px;
  color: var(--pen); background: var(--paper); box-shadow: inset 0 0 0 1px var(--pen-line);
  transition: background 150ms ease, transform 160ms var(--ease-out);
}
.saybtn .ico { width: 18px; height: 18px; }
.saybtn:active { transform: scale(0.94); }
.saybtn.is-playing, [data-say].is-playing, [data-say-q].is-playing { background: var(--pen); color: var(--on-pen); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .saybtn:hover { background: var(--pen-soft); } }

/* ---------- 예문 블록 (eng) ---------- */
.blk--eng { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); padding-top: 26px; }
.blk--eng .blk__tab { background: var(--ink); color: var(--paper); }
.eng__hide { position: absolute; top: 10px; right: 14px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.eng__hide .ico { width: 15px; height: 15px; }
.eng { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.eng__i { padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.eng__i:last-child { padding-bottom: 0; border-bottom: 0; }
.eng__row { display: flex; gap: 10px; align-items: flex-start; }
.eng__en { font-family: var(--font-en); font-size: 17.5px; line-height: 1.6; font-weight: 520; color: var(--ink); padding-top: 3px; min-width: 0; overflow-wrap: anywhere; }
.eng__en b, .eng__en mark { font-weight: 750; }
.eng__en s, .blk s { color: var(--red-ink); text-decoration-thickness: 2px; text-decoration-color: var(--red); }
.eng__ko { margin: 4px 0 0 44px; font-size: 15px; line-height: 1.65; color: var(--ink-2); transition: filter 160ms ease, opacity 160ms ease; }
.eng__note { margin: 6px 0 0 44px; font-size: 14px; line-height: 1.6; color: var(--pen); font-weight: 600; }
.blk--eng.is-hidden-ko .eng__ko { filter: blur(6px); opacity: 0.55; cursor: pointer; user-select: none; }
.blk--eng.is-hidden-ko .eng__i:active .eng__ko,
.blk--eng.is-hidden-ko .eng__ko:hover { filter: none; opacity: 1; }
@media (max-width: 640px) {
  .eng__en { font-size: 16.5px; }
  .eng__ko, .eng__note { margin-left: 0; }
  .eng__hide { position: static; margin: -6px 0 8px; }
}

/* trap 블록 안 틀린/옳은 표현 */
.blk--trap s { opacity: 0.9; }

/* ---------- 문제: 지문 도구 (듣기 · 해석) ---------- */
.q__passage { font-family: var(--font-en); }
.q__passage p { margin: 0 0 0.7em; }
.q__passage p:last-child { margin-bottom: 0; }
.q__ptools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: -4px 0 16px; }
.q__ko { flex: 1 1 100%; }
.q__ko > summary {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13.5px; font-weight: 600; color: var(--ink-2); list-style: none;
}
.q__ko > summary::-webkit-details-marker { display: none; }
.q__ko > summary .ico { width: 16px; height: 16px; }
.q__ko[open] > summary { color: var(--pen); box-shadow: inset 0 0 0 1px var(--pen-line); }
.q__ko > div { margin-top: 10px; padding: 14px 16px; border-radius: 10px; background: var(--surface); font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.q__ptools .chipbtn { order: -1; }

/* ---------- 배열 영작 ---------- */
.q__order { display: grid; gap: 12px; }
.ord__bank { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ord__tok {
  min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 var(--line-2); font-family: var(--font-en); font-size: 16px; font-weight: 600;
  transition: transform 140ms var(--ease-out), opacity 140ms ease, background 140ms ease;
}
.ord__tok:active:not(:disabled) { transform: scale(0.95); }
.ord__tok.is-used { opacity: 0.32; box-shadow: inset 0 0 0 1px var(--line); text-decoration: line-through; }
.ord__tok:disabled { cursor: default; }
.ord__clear { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; }
.ord__clear .ico { width: 15px; height: 15px; }
.ord__note { font-size: 13.5px; color: var(--amber-ink); font-weight: 600; }
.q__order .q__input { font-family: var(--font-en); }
@media (hover: hover) and (pointer: fine) { .ord__tok:hover:not(:disabled) { background: var(--pen-soft); } }

/* ---------- 홈: 오늘의 루틴 ---------- */
.routine { margin-bottom: 32px; }
.routine .sechead { align-items: center; margin-bottom: 12px; }
.streak { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.streak .ico { width: 17px; height: 17px; }
.streak.is-on { color: var(--red-ink); }
.streak.is-on .ico { fill: color-mix(in oklch, var(--red) 25%, transparent); }
.routine__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rtn {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--paper);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); transition: box-shadow 200ms ease, transform 160ms var(--ease-out); min-width: 0;
}
.rtn:active { transform: scale(0.985); }
.rtn__ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--pen-soft); color: var(--pen); }
.rtn__ico .ico { width: 21px; height: 21px; }
.rtn__b { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rtn__k { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.rtn__v { font-size: 16.5px; font-weight: 750; letter-spacing: -0.015em; color: var(--ink); line-height: 1.35; }
.rtn__m { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
@media (hover: hover) and (pointer: fine) { .rtn:hover { box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); } }
@media (max-width: 980px) { .routine__grid { grid-template-columns: minmax(0, 1fr); } .rtn { align-items: center; } }

/* ---------- 상단 메뉴가 7개라 중간 폭에서 좁게 ---------- */
@media (min-width: 820px) and (max-width: 1180px) {
  .topnav a { padding: 0 8px; font-size: 14px; }
  .topnav a::after { left: 8px; right: 8px; }
  .searchbtn__label, .searchbtn__kbd { display: none; }
  .searchbtn { min-width: 0; width: 38px; padding: 0; justify-content: center; }
}
@media (max-width: 819px) { .tabbar { grid-template-columns: repeat(6, 1fr); } .tabbar a, .tabbar button { font-size: 11px; } }

/* 읽어 주는 중 */
@media (prefers-reduced-motion: reduce) { .ord__tok, .rtn, .saybtn { transition: none; } }

/* 지문 도구: 듣기·해석 버튼을 한 줄에, 해석을 펼치면 아래로 넓게 */
.q__ko { flex: 0 1 auto; }
.q__ko[open] { flex-basis: 100%; }
