/* Study page line cards (Nov 7, 2026; ops/work/study-lines). Testers only: section.dialogue.ffl-on (VocabDeck::line_view).
   No person icons. Tap the line = play (the bundle's .sentence handler, unchanged); the + beside the card opens its
   English + words. Meanings stay blank until tapped. English (top) shows every line's English under its Thai. */
body.dialog section.dialogue.ffl-on div.base-language { display: none !important; }
body.dialog section.dialogue.ffl-on.show-base-language div.original-language { visibility: visible; }
body.dialog section.dialogue.ffl-on div.container { gap: 10px; }
.ffl { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 4px; align-items: start; width: 100%; box-sizing: border-box; text-align: left; }
.ffl__card { min-width: 0; background: var(--ff-card, #eef4fc); border: 1px solid var(--ff-card-border, #d5e1f2); border-radius: 12px; }
.ffl.is-open .ffl__card { border-color: var(--ff-blue, #3b7ff0); }
body.dialog section.dialogue.ffl-on div.container .ffl div.sentence { background: transparent; border: 0; border-radius: 12px; cursor: pointer; }
body.dialog section.dialogue.ffl-on div.container .ffl div.sentence.ff-playing { background: rgba(59, 127, 240, .07); }
.ffl__en { margin: -6px 14px 10px; font-size: var(--ff-en-line, 18px); line-height: 1.4; color: #4b5563; }
.ffl__plus { width: 40px; height: 44px; margin-top: 8px; padding: 0; border: 0; border-radius: 20px; background: transparent; color: #4b5563; display: grid; place-items: center; cursor: pointer; }
.ffl__plus:hover { background: rgba(17, 24, 39, .05); }
.ffl__plus:focus-visible, .ffl__panel button:focus-visible { outline: 2px solid var(--ff-blue, #3b7ff0); outline-offset: 2px; }
.ffl.is-open .ffl__vbar { display: none; }
.ffl__panel { border-top: 1px solid var(--ff-card-border, #d5e1f2); padding: 4px 6px 10px; display: flex; flex-direction: column; }
.ffl__panel[hidden], .ffl__w[hidden], .ffl__en[hidden] { display: none; }
.ffl__w { display: grid; grid-template-columns: minmax(0, 1fr) 40px 40px; gap: 4px; align-items: center; }
.ffl__reveal { width: 100%; box-sizing: border-box; display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; align-items: center; min-height: 44px; padding: 0 0 0 8px; border: 0; background: transparent; text-align: left; color: var(--ff-ink, #1f2937); font: inherit; cursor: pointer; min-width: 0; }
.ffl__th { font-size: 20px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ffl__g { text-align: left; min-width: 0; overflow-wrap: anywhere; min-height: 26px; box-sizing: border-box; padding: 4px 8px; border-radius: 6px; background: #dbe6f5; font-size: 15px; line-height: 1.3; color: #374151; }
.ffl__g.is-shown { background: transparent; }
.ffl__ico { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 20px; background: transparent; display: grid; place-items: center; font-size: 19px; line-height: 1; cursor: pointer; }
.ffl__wplay { color: var(--ff-blue-dark, #2563eb); }
.ffl__save { color: #9ca3af; }
.ffl__save.is-on { color: #6d28d9; }
.ffl__more { align-self: flex-start; min-height: 40px; margin-left: 2px; padding: 0 6px; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--ff-blue-dark, #2563eb); cursor: pointer; }
.ffl__acts { display: flex; gap: 6px; padding: 6px 8px 0; }
.ffl__chip { min-width: 44px; height: 38px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 19px; background: #fff; font: inherit; font-size: 14px; color: var(--ff-ink, #1f2937); display: inline-grid; place-items: center; cursor: pointer; }
.ffl__chip.ffl__replay { padding: 0; color: var(--ff-blue-dark, #2563eb); }
.ffl__chip[aria-pressed="true"] { background: #dbeafe; border-color: #bfdbfe; }

/* + as part of a speaker strip on the right, thumb side (owner, Nov 7): the whole strip is the button,
   + centred; A ink, B blue. Cards get the full width (no separate + column). */
.ffl { grid-template-columns: minmax(0, 1fr); position: relative; --ffl-spk: #334155; }
.ffl:nth-child(even) { --ffl-spk: #60a5fa; }
.ffl__card { padding-right: 40px; overflow: hidden; }
.ffl__plus { position: absolute; top: 0; right: 0; bottom: 0; width: 40px; height: auto; margin: 0; border-radius: 0 12px 12px 0; background: var(--ffl-spk); color: #fff; }
.ffl__plus:hover { background: var(--ffl-spk); filter: brightness(1.1); }
.ffl__plus:focus-visible { outline-offset: -4px; outline-color: #fff; }

/* v2 (Nov 7, owner; lines from the new content tables, Vietnamese #72 first): the line card keeps its size and the
   item cards hang below it, indented, white; meaning hidden until tapped; + on a phrase opens its pieces. */
.ffl--v2 .ffl__head { position: relative; }
.ffl--v2 .ffl__kids { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px 28px; padding: 0; border-top: 0; font-size: 16px; line-height: 1.4; }
.ffl__kids[hidden], .ffl__subs[hidden], .ffl__it[hidden] { display: none; }
.ffl__row { display: flex; align-items: stretch; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 1px 2px rgba(17, 24, 39, .06); overflow: hidden; }
.ffl--v2 .ffl__reveal { flex: 1; grid-template-columns: auto minmax(0, 1fr); gap: 12px; min-height: 44px; padding: 6px 12px; }
.ffl--v2 .ffl__th { font-size: 19px; }
.ffl--v2 .ffl__g { min-height: 24px; text-align: right; background: #e8eef7; font-size: 14px; }
.ffl--v2 .ffl__g.is-shown { background: transparent; }
.ffl__g--note.is-shown { font-style: italic; color: #4b5563; }
.ffl__gap { color: #9ca3af; font-weight: 400; padding: 0 .15em; }
.ffl__sub { flex: none; width: 40px; padding: 0; border: 0; border-left: 1px solid #e5e7eb; background: #f8fafc; color: #4b5563; font: inherit; font-size: 20px; cursor: pointer; }
.ffl__subs { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 0 24px; }
.ffl--v2 .ffl__more { margin-left: 0; }

/* hidden meaning bar: capped and right-aligned so wide screens show a short "tap to see" bar, not a long empty field (owner, Nov 7) */
.ffl--v2 .ffl__g:not(.is-shown) { justify-self: end; width: 100%; max-width: 160px; }

/* item cards (owner, Nov 7): meanings line up. Cards without pieces keep the + column's width as plain space,
   so every meaning (and every hidden bar) ends in the same place; the list stays phone-width on big screens */
.ffl--v2 .ffl__kids { max-width: 460px; }
.ffl--v2 .ffl__row:not(:has(.ffl__sub)) .ffl__reveal { padding-right: 52px; }
.ffl--v2 .ffl__g { font-size: 15px; }

/* Grok long-lines test, Nov 9: a long word or pattern squeezed its meaning into a one-letter column. The word now
   takes at most ~58% and wraps; the meaning drops under the word when it has less than ~7em; words break at spaces. */
.ffl--v2 .ffl__reveal { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; }
.ffl--v2 .ffl__th { flex: 0 1 auto; max-width: 100%; min-width: 0; }
.ffl--v2 .ffl__g { flex: 1 1 7em; min-width: 0; }
.ffl--v2 .ffl__g:not(.is-shown) { width: auto; max-width: 160px; margin-left: auto; }
.ffl__th, .ffl__g { overflow-wrap: break-word; }
@media (max-width: 420px) {
  .ffl--v2 .ffl__kids { margin-left: 14px; }
}
