/* Home: the front door of the Vocabulary section (ledger L-085, L-088, L-091). Same family as the
   lesson page (the colors, font and shapes of Chris's Stitch design, docs/design/stitch-2026-11-08),
   but its own layout: a page for choosing, not for reading. */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2"); }

body.home {
  --ink: #0E1A36; --mut: #5F6678; --mut2: #6C7382; /* L-106: darkened to 4.5 to 1 */ --canvas: #FAF9F6; --line: #EDE8E0; --hair: #F4EFE8;
  --orange: #C54A24; --tango: #DD4124; --blue: #00539C; --peach: #FFF6F0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink); background: var(--canvas); font-size: 0.9375rem; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
.home main { background: var(--canvas); }
.home .page { max-width: 36rem; margin: 0 auto; padding: 0 0 2.5rem; }
.home p { margin: 0; }
.home [lang="ko"] { font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; }
.home a { color: inherit; text-decoration: none; }
.home :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.home [hidden] { display: none !important; }

/* Notices that other parts of the app put at the top of a page */
.home #inapp, .home #report-arrived { margin: 0; padding: 0.7rem 1.25rem; background: #FFF1D6; color: #5C3B00; font-size: 0.8rem; line-height: 1.4; border: 0; border-bottom: 1px solid #F2DDAE; }
.home #report-arrived button { min-height: 44px; margin-top: 0.4rem; padding: 0 1rem; border: 0; border-radius: 10px; background: #8A5A00; color: #fff; font-family: inherit; font-weight: 700; }
.home.plain .page { padding: 1.5rem 1.25rem; }
.home.plain .page a { color: var(--blue); text-decoration: underline; }

/* Header */
.home .hero { position: relative; overflow: hidden; padding: 0.6rem 1.25rem 4.4rem; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #24365F 0%, var(--ink) 55%); border-radius: 0 0 28px 28px; }
.home .hero:has(+ .results:not([hidden])) { padding-bottom: 1.4rem; }
.home .hero::after { content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; border: 34px solid rgba(221, 65, 36, 0.16); pointer-events: none; }
.home .hero > * { position: relative; z-index: 1; }
.home .bar { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.home .brand { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #FFB59F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home .brand::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tango); }
.home .test { flex: none; padding: 0.15rem 0.4rem; border-radius: 5px; background: rgba(252, 158, 33, 0.22); color: #FFCB7A; font-size: 0.56rem; font-weight: 800; letter-spacing: 0.1em; }
.home .me { flex: none; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; margin-left: auto; padding: 0 0.75rem 0 0.6rem; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.13); color: #fff; font-family: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; }
.home .me:active { background: rgba(255, 255, 255, 0.22); }
.home .me .who { position: relative; width: 14px; height: 15px; }
.home .me .who::before { content: ""; position: absolute; left: 3.5px; top: 0; width: 7px; height: 7px; border-radius: 50%; border: 1.8px solid #fff; box-sizing: border-box; }
.home .me .who::after { content: ""; position: absolute; left: 0; bottom: 0; width: 14px; height: 7px; border: 1.8px solid #fff; border-bottom: 0; border-radius: 8px 8px 0 0; box-sizing: border-box; }
.home .hero h1 { margin: 1.3rem 0 0.2rem; font-size: 2rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; }
.home .hero .sub { font-size: 0.85rem; color: rgba(255, 255, 255, 0.9); font-weight: 600; }
.home .hero .sub .dim { color: rgba(255, 255, 255, 0.7); font-weight: 400; }

/* Search: the main tool of this page */
.home .search { display: flex; align-items: center; gap: 0.6rem; min-height: 52px; margin-top: 1.1rem; padding: 0 0.5rem 0 1rem; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); }
.home .search .glass { position: relative; flex: none; width: 15px; height: 15px; border: 2.2px solid #8A91A1; border-radius: 50%; box-sizing: border-box; }
.home .search .glass::after { content: ""; position: absolute; right: -6px; bottom: -4px; width: 7px; height: 2.2px; border-radius: 2px; background: #8A91A1; transform: rotate(45deg); }
.home .search input { flex: 1; min-width: 0; min-height: 52px; border: 0; outline: 0; background: none; color: var(--ink); font-family: inherit; font-size: 1rem; -webkit-appearance: none; appearance: none; }
.home .search input::placeholder { color: #6C7382; } /* L-106: was #7C8496 (3.8 to 1) */
.home .search input::-webkit-search-cancel-button { display: none; }
.home .search:focus-within { box-shadow: 0 0 0 3px rgba(252, 158, 33, 0.7), 0 10px 30px -10px rgba(0, 0, 0, 0.5); }
.home .search .clear { position: relative; flex: none; width: 44px; height: 44px; min-width: 44px; border: 0; background: none; cursor: pointer; }
.home .search .clear::before, .home .search .clear::after { content: ""; position: absolute; left: 14px; top: 21px; width: 16px; height: 2px; border-radius: 2px; background: #6F7789; transform: rotate(45deg); }
.home .search .clear::after { transform: rotate(-45deg); }

/* Continue / Start here: lifts out of the header */
.home .body { padding: 0 1.25rem; }
.home .slot:empty { display: none; }
.home .continue { position: relative; z-index: 2; display: flex; align-items: center; gap: 0.9rem; margin-top: -3.25rem; padding: 1rem; background: #fff; border-radius: 20px; box-shadow: 0 18px 40px -14px rgba(14, 26, 54, 0.35), 0 2px 6px rgba(14, 26, 54, 0.06); }
.home .body > .slot:first-child:empty + .slot { margin-top: -2.6rem; position: relative; z-index: 2; }
.home .continue:active { transform: translateY(1px); }
.home .continue .go { flex: none; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--orange); box-shadow: 0 8px 18px -6px rgba(197, 74, 36, 0.7); }
.home .continue .go::before { content: ""; width: 11px; height: 11px; margin-left: -4px; border-right: 3px solid #fff; border-top: 3px solid #fff; transform: rotate(45deg); }
.home .continue .tx { display: flex; flex-direction: column; min-width: 0; }
.home .continue .k { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--orange); }
.home .continue .t { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.home .continue .s { margin-top: 0.15rem; font-size: 0.8rem; color: var(--mut); }

/* Ways to study */
.home .ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.4rem, 1fr)); gap: 0.65rem; margin-top: 1.2rem; }
.home .way { display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 92px; padding: 0.85rem 0.5rem 0.75rem; border-radius: 18px; text-align: center; }
.home .way .nm, .home .way .sm { max-width: 100%; overflow-wrap: anywhere; }
.home .way .nm { font-size: 0.8rem; font-weight: 700; line-height: 1.2; }
.home .way .sm { margin-top: 0.15rem; font-size: 0.68rem; font-weight: 600; opacity: 0.9; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.home .way .ic { position: relative; width: 26px; height: 26px; margin-bottom: 0.45rem; }
.home .way.a { background: #E6EEF6; color: var(--blue); }
.home .way.b { background: #FFE8DC; color: #9B3513; }
.home .way.c { background: #FFF1D6; color: #6E4700; }
.home .way:active { filter: brightness(0.96); }
/* headphones */
.home .way.a .ic::before { content: ""; position: absolute; inset: 2px 2px 8px; border: 2.4px solid currentColor; border-bottom: 0; border-radius: 12px 12px 0 0; }
.home .way.a .ic::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: 2px; height: 9px; border-left: 6px solid currentColor; border-right: 6px solid currentColor; border-radius: 3px; }
/* list with a play mark */
.home .way.b .ic::before { content: ""; position: absolute; left: 2px; top: 5px; width: 15px; height: 2.4px; border-radius: 2px; background: currentColor; box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor; }
.home .way.b .ic::after { content: ""; position: absolute; right: 1px; bottom: 2px; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
/* sliders */
.home .way.c .ic::before { content: ""; position: absolute; left: 3px; right: 3px; top: 7px; height: 2.4px; border-radius: 2px; background: currentColor; box-shadow: 0 10px 0 currentColor; }
.home .way.c .ic::after { content: ""; position: absolute; left: 6px; top: 3.5px; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 6px 10px 0 currentColor; }

/* Groups of lessons: covers on a shelf */
.home h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin: 1.7rem 0 0.7rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.home h2 .n { font-size: 0.75rem; font-weight: 600; letter-spacing: 0; color: var(--mut); }
.home .shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.3rem, 1fr)); gap: 0.7rem; }
.home .cover { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 8.6rem; padding: 0.95rem; border-radius: 20px; color: #fff; }
.home a.cover:active { transform: translateY(1px); filter: brightness(0.96); }
.home .cover::before { content: ""; position: absolute; right: -34px; top: -34px; width: 104px; height: 104px; border-radius: 50%; border: 18px solid rgba(255, 255, 255, 0.1); }
.home .cover .t { position: relative; font-size: 1.22rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.home .cover .m { position: relative; display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.55rem; }
.home .chip { padding: 0.18rem 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.home .chip.warn { background: rgba(14, 26, 54, 0.45); }
.home .c0 { background: linear-gradient(140deg, #C54A24 0%, #8E2F12 100%); }
.home .c1 { background: linear-gradient(140deg, #1463A8 0%, #00447F 100%); }
.home .c2 { background: linear-gradient(140deg, #2B3F6E 0%, #0E1A36 100%); }
.home .c3 { background: linear-gradient(140deg, #A86500 0%, #6B3F00 100%); }
.home .c4 { background: linear-gradient(140deg, #B22206 0%, #771400 100%); }
.home .cover.todo { min-height: 0; padding: 0.7rem 0.85rem; justify-content: center; border-radius: 16px; background: none; border: 2px dashed #CBD0D9; color: var(--mut); align-self: start; }
.home .cover.todo::before { display: none; }
.home .cover.todo .t { font-size: 0.95rem; font-weight: 700; color: #4A5368; }
.home .cover.todo .m { margin-top: 0.35rem; }
.home .cover.todo .chip { background: #ECEEF2; color: #4A5368; }

/* Recently opened */
.home .recent { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.home .pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.95rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.82rem; font-weight: 600; }

/* Lists: search results, and the test site's fixture decks */
.home .results { padding: 1rem 1.25rem 0; }
.home .results .count { margin-bottom: 0.6rem; font-size: 0.75rem; font-weight: 600; color: var(--mut); }
.home .list { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.home .hit, .home .row { display: flex; flex-direction: column; gap: 0.1rem; min-height: 56px; padding: 0.65rem 1rem; justify-content: center; }
.home .hit + .hit, .home .row + .row { border-top: 1px solid var(--hair); }
.home .hit:active, .home .row:active { background: #FBF7F1; }
.home .hit .en, .home .row .w { font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.home .hit .ko { font-size: 0.82rem; color: var(--mut); white-space: pre-line; }
.home.hide-ko .hit .ko { display: none; }
.home .hit .mk { display: inline-block; margin-right: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 0.12em; white-space: nowrap; }
.home .hit .mk.wrong { background: #FDE7E7; color: #A11A1A; }
.home .hit .mk.careful { background: #FFF1CF; color: #7A5200; }
.home .hit .mk.ok, .home .hit .mk.wrong, .home .hit .mk.careful { box-shadow: 0 0 0 1.5px white; } /* L-218, as in lesson.css */
.home .hit .at, .home .row .k { font-size: 0.7rem; font-weight: 600; color: var(--mut2); }
.home .hit.section .en::before, .home .hit.lesson .en::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 0.45rem; border-radius: 2px; background: var(--orange); vertical-align: 0.1em; }
.home mark { background: #FFE2B8; color: inherit; border-radius: 3px; padding: 0 1px; }
.home .empty, .home .wait { margin-top: 1.4rem; padding: 0.9rem 1rem; border: 1px dashed #CBD0D9; border-radius: 14px; color: var(--mut); font-size: 0.85rem; }
.home .results .empty { margin-top: 0; }
.home .results .more { display: block; width: 100%; margin: 0.8rem 0 1rem; }
.home .fine { margin-top: 1.6rem; color: var(--mut2); font-size: 0.72rem; line-height: 1.45; }

/* Menu: the pill, in its own bottom row so it never covers content (L-023) */
.home .menubar { padding: 6px 16px 8px; text-align: center; background: var(--canvas); border-top: 1px solid #EAE6DE; }
.home .menubar > button { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0 1.2rem; border: 1px solid rgba(197, 74, 36, 0.4); border-radius: 999px; background: #fff; color: var(--orange); font-family: inherit; font-size: 0.69rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; box-shadow: 0 8px 24px -4px rgba(14, 26, 54, 0.08), 0 2px 6px -1px rgba(14, 26, 54, 0.04); cursor: pointer; }
.home .menubar > button::before { content: ""; width: 7px; height: 7px; margin-top: 4px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }
.home .menubar > button[aria-expanded="true"]::before { margin-top: -4px; transform: rotate(225deg); }
.home .menubar ul:not([hidden]) { display: grid; gap: 0.2rem; max-width: 34rem; margin: 0.2rem auto 0.5rem; padding: 0.6rem; list-style: none; text-align: left; background: #18233C; border-radius: 16px; }
.home .menubar li a, .home .menubar li span { display: flex; align-items: center; min-height: 44px; padding: 0 0.8rem; border-radius: 10px; color: #fff; font-size: 0.85rem; font-weight: 600; }
.home .menubar li span { color: rgba(255, 255, 255, 0.7); font-weight: 400; font-size: 0.78rem; }
.home .menubar li button { margin: 0.2rem 0.8rem 0.3rem; min-height: 44px; padding: 0 1rem; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 10px; background: transparent; color: #fff; font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }

/* A long placeholder ends in "…" instead of being cut mid-letter */
.home .search input:placeholder-shown { text-overflow: ellipsis; }
.home .search { scroll-margin-top: 8px; }

/* A narrow phone (360 px is the common Galaxy width; a fold's cover screen is 344): the app's
   name and the search field's hint fit instead of being cut (L-118). */
@media (max-width: 380px) {
  .home .brand { font-size: 0.56rem; letter-spacing: 0.04em; gap: 0.35rem; }
  .home .search input::placeholder { font-size: 0.875rem; }
}

/* A screen wider than a phone but narrower than the desktop view (an opened foldable, a tablet
   held upright; L-118): the header runs the full width and what is on it keeps a column, and the
   lists below get a wider column, instead of a phone-wide strip in the middle. */
@media (min-width: 600px) and (max-width: 1023.98px) {
  .home .page { max-width: none; }
  .home .hero { padding-left: max(1.25rem, calc(50% - 22rem)); padding-right: max(1.25rem, calc(50% - 22rem)); }
  .home .body, .home .results { box-sizing: border-box; max-width: 46.5rem; margin-left: auto; margin-right: auto; }
  .home #inapp, .home #report-arrived { padding-left: max(1.25rem, calc(50% - 22rem)); padding-right: max(1.25rem, calc(50% - 22rem)); }
}

/* A fold's cover screen (344 px) and narrower: the app's name without its letter spacing, so it is not cut (L-118) */
@media (max-width: 350px) {
  .home .brand { letter-spacing: 0; }
}
