@import url("/css/reader-word-sheet.css");
.account-profile__summary, .account-profile__name-label, .account-profile__cancel, .continue-selection-count { display: none; }
.portal-back { display: inline-flex; align-items: center; gap: 4px; }
.portal-back svg { width: 20px; height: 20px; }
/* Mobile portal only; public landing pages keep their own navigation. */
.mobile-portal-nav, .mobile-profile-title, .mobile-profile-links, .mobile-reader-header, .mobile-word-handle { display: none; }
@media (max-width: 760px) {
  .layout.portal-with-tabs { display: block; min-height: 100dvh; }
  .portal-with-tabs .sidebar { display: none; }
  .portal-with-tabs > .main, .portal-profile { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .portal-no-mobile-nav.portal-with-tabs > .main { padding-bottom: 0; }
  .mobile-portal-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 12px max(8px, env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); box-shadow: 0 -4px 24px rgb(32 37 31 / 4%); }
  .mobile-portal-nav > a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px; color: #777C73; text-decoration: none; font-size: 12px; font-weight: 700; }
  .mobile-portal-nav > a > span { display: grid; place-items: center; width: 60px; height: 30px; border-radius: 18px; }
  .mobile-portal-nav svg { width: 25px; height: 25px; }
  .mobile-portal-nav > a[aria-current='page'] { color: var(--primary); }
  .mobile-portal-nav > a[aria-current='page'] > span { background: transparent; color: inherit; }
  .library { padding: 24px 16px 32px; gap: 52px; box-sizing: border-box; }
  .library-section { gap: 16px; }
  .library-section h2 { font-size: 27px; }
  .library-section-heading { margin-bottom: 0; gap: 12px; }
  .library-section-heading a { font-size: 13px; white-space: nowrap; }
  .library-section--mascot { padding-left: 0; }
  .library-section--mascot .story-toolbar > h2 { padding-left: 60px; min-height: 60px; display: flex; align-items: center; }
  .library-section--mascot h2 img { left: 0; right: auto; width: 46px; }
  .library--no-continue { padding-top: 32px; }
  .story-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .story-filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .story-dropdown { width: auto; min-width: 0; }
  .story-dropdown__btn { min-height: 44px; }
  .story-dropdown__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .story-dropdown__menu { max-height: 45dvh; overflow-y: auto; }
  .story-dropdown__menu button { min-height: 44px; }
  .story-search { grid-column: 1 / -1; width: 100%; box-sizing: border-box; min-height: 44px; }
  .story-search input { font-size: 16px; min-width: 0; }
  .story-grid, .continue-lead, .continue-lead--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .continue-lead__feature { grid-column: 1 / -1; grid-row: auto; }
  .story-card__title { font-size: 16px; }
  .story-card--featured .story-card__title { font-size: 23px; }
  .story-card__body { padding: 10px; }
  .story-card__meta { font-size: 11px; }
  .continue-page { gap: 24px; }
  .continue-page h1 { font-size: 28px; }
  .continue-tools { gap: 12px; margin-bottom: 0; }
  .continue-tools__actions { grid-template-columns: auto 1fr; gap: 8px; }
  .continue-tools__actions button { font-size: 12px; padding: 12px 10px; }
  .vocab-page { padding: 24px 16px 32px; box-sizing: border-box; }
  .vocab-page h1 { font-size: 28px; }
  .vocab-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .vocab-filters .vocab-type { grid-column: 1 / -1; }
  .vocab-pill { min-height: 44px; font-size: 12px; }
  .vocab-row { gap: 10px; padding: 16px 0; }
  .vocab-speaker { width: 48px; height: 52px; flex: 0 0 48px; }
  .vocab-word { min-width: 0; }
  .vocab-hebrew { font-size: 26px; overflow-wrap: anywhere; }
  .vocab-status__btn { padding: 10px 8px; min-height: 44px; gap: 5px; font-size: 11px; }
  .vocab-status__dot { width: 7px; height: 7px; }
  .vocab-gloss { font-size: 13px; }
  .vocab-menu { max-width: calc(100vw - 32px); }
  .vocab-guide { margin: 24px auto; }
  .vocab-guide__copy { font-size: 15px; }
  .portal-profile { padding: calc(28px + env(safe-area-inset-top)) 20px calc(110px + env(safe-area-inset-bottom)); }
  .portal-profile .account-page__frame { padding: 0; max-width: 560px; }
  .portal-profile .account-page__logo, .portal-profile .account-page__back, .portal-profile .account-page__nav { display: none; }
  .mobile-profile-title { display: block; margin: 0 0 28px; font-size: 30px; line-height: 1.2; }
  .mobile-profile-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .mobile-profile-links a { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; min-height: 108px; padding: 20px; border-radius: 20px; color: var(--text); background: var(--surface-muted); text-decoration: none; font-size: 15px; font-weight: 700; }
  .portal-profile .account-page__body { display: block; margin-top: 36px; }
  .portal-profile .account-settings { gap: 32px; }
  .portal-profile .account-card { padding: 0; border: 0; border-radius: 0; background: transparent; }
  .portal-profile .account-card h2 { font: 700 18px/1.4 var(--font-sans); margin-bottom: 16px; }
  .portal-profile .account-identity > h2 { display: none; }
  .portal-profile .account-profile { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; }
  .account-profile__avatar { width: 56px; height: 56px; }
  .account-profile__summary { display: block; min-width: 0; }
  .account-profile__summary strong { display: block; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
  .account-profile__summary p { margin: 5px 0 12px; font-size: 14px; line-height: 1.5; color: #686F64; overflow-wrap: anywhere; }
  .account-profile__summary button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 14px; background: var(--surface-muted); color: var(--text); font: 700 14px var(--font-sans); }
  .portal-profile .account-profile__fields { display: none; grid-column: 1 / -1; }
  .portal-profile .account-profile.is-editing .account-profile__fields { display: block; }
  .account-profile.is-editing .account-profile__summary button { display: none; }
  .account-profile__name-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
  .portal-profile .account-profile__name { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .portal-profile .account-profile__name input { width: 100%; height: 48px; padding: 0 14px; background: var(--surface-muted); border: 1px solid transparent; border-radius: 14px; font: 400 16px var(--font-sans); }
  .portal-profile .account-profile__name button { height: 48px; padding: 0 18px; border-radius: 14px; }
  .portal-profile .account-profile__email { display: none; }
  .account-profile__cancel { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 10px; padding: 8px 16px; border: 0; border-radius: 14px; background: var(--surface-muted); color: var(--text); font: 600 14px var(--font-sans); }
  .portal-profile .account-billing { border-top: 1px solid var(--border); padding-top: 28px; }
  .portal-profile .account-billing p { margin: 8px 0; font-size: 15px; line-height: 1.65; }
  .portal-profile .account-billing .premium-button, .portal-profile .account-billing__manage { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin-top: 20px; text-decoration: none; border-radius: 18px; font-size: 15px; }
  .portal-profile .account-notices { gap: 0; padding: 0 18px; background: var(--surface-muted); border-radius: 20px; }
  .portal-profile .account-notice { min-height: 96px; padding: 20px 0; gap: 20px; }
  .portal-profile .account-notice + .account-notice { border-top: 1px solid var(--border); }
  .portal-profile .account-notice__label { font-size: 15px; line-height: 1.4; }
  .portal-profile .account-notice__hint { font-size: 13px; line-height: 1.5; margin-top: 5px; color: #686F64; }
  .portal-profile .account-switch { width: 48px; height: 28px; flex-shrink: 0; }
  .portal-profile .account-switch::before { content: ''; position: absolute; inset: -8px -2px; }
  .portal-profile .account-switch span { width: 22px; height: 22px; top: 3px; left: 3px; }
  .portal-profile .account-switch.is-on span { transform: translateX(20px); }
  .portal-profile .account-logout { justify-content: stretch; margin-top: 0; }
  .portal-profile .account-logout button { width: 100%; min-height: 50px; justify-content: center; padding: 12px 18px; border-radius: 16px; background: var(--surface-muted); gap: 10px; }
  .portal-profile .account-subpage h2 { font-size: 28px; }
  .portal-profile .account-subpage p { font-size: 16px; line-height: 1.7; }
  .portal-profile .account-subpage article { padding: 28px 0; }
  .portal-profile .account-subpage article h3 { font-size: 21px; line-height: 1.35; }
  .portal-profile .account-subpage > .premium-button { display: flex; justify-content: center; align-items: center; min-height: 50px; margin-top: 28px; text-decoration: none; }
  .premium-page { padding: 24px 20px 100px; }
  .premium-page__hero h1 { font-size: 30px; }
  /* The reader has its own header and dock, without the portal tab bar. */
  .reader--portal:not(.reader--demo) { padding: 0 14px calc(var(--mobile-dock-height, 130px) + 36px); max-width: 100%; box-sizing: border-box; }
  .reader--portal:not(.reader--demo) > .reader__intro, .reader--portal:not(.reader--demo) > .reader__controls--desktop { display: none; }
  .mobile-reader-header { display: block; --collapse: 0; margin: 0 -14px 24px; height: 300px; }
  .mobile-reader-header__cover { position: relative; height: 300px; overflow: hidden; background: var(--reader-intro); }
  .mobile-reader-header__cover > img { width: 100%; height: 100%; object-fit: cover; }
  .mobile-reader-header__cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 15%, rgb(32 37 31 / 78%)); }
  .mobile-reader-header__meta { position: absolute; z-index: 1; bottom: 24px; left: 20px; right: 20px; color: white; opacity: calc(1 - var(--collapse)); }
  .mobile-reader-header__meta > span { font-size: 12px; font-weight: 700; }
  .reader .mobile-reader-header h1 { font-size: 28px; line-height: 1.15; color: white; margin: 8px 0; }
  .mobile-reader-header__meta p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.5; margin: 0; }
  .mobile-reader-header__unit { display: block; margin: 0 0 6px; color: white; font-size: 13px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
  .mobile-reader-header__toolbar { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgb(252 252 249 / calc(var(--collapse) * .98)); border-bottom: 1px solid rgb(220 222 213 / var(--collapse)); }
  .mobile-reader-header__toolbar > a, .mobile-reader-header__toolbar > button { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 16px; border: 1px solid rgb(255 255 255 / 50%); background: rgb(252 252 249 / 92%); color: var(--text); font: 700 19px var(--font-sans); text-decoration: none; }
  .mobile-reader-header__toolbar svg { width: 24px; height: 24px; }
  .mobile-reader-header__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; color: var(--text-muted); font-weight: 700; opacity: var(--collapse); }
  .reader--portal:not(.reader--demo) .reader__stage { display: block; }
  .reader--portal:not(.reader--demo) .reader__hebrew { border: 0; padding: 0; }
  .reader--portal:not(.reader--demo) .reader__sentence { scroll-margin-top: calc(90px + env(safe-area-inset-top)); scroll-margin-bottom: calc(var(--mobile-dock-height, 130px) + 24px); }
  .reader--portal:not(.reader--demo) .reader__english { font-size: 16px; line-height: 1.6; }
  .reader--portal:not(.reader--demo) .reader-float { position: fixed; z-index: 35; top: auto; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; max-width: none; margin: 0; gap: 0; padding: 0; max-height: min(62dvh, 490px); border: 1px solid var(--border); border-radius: 24px; background: var(--bg); box-shadow: 0 6px 32px rgb(32 37 31 / 16%); overflow: auto; overscroll-behavior: contain; }
  .mobile-word-handle { display: flex; position: relative; flex-shrink: 0; order: -3; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 18px 16px 8px; border: 0; background: transparent; color: var(--text-muted); font: 600 12px var(--font-sans); }
  .mobile-word-handle__grip { position: absolute; top: 7px; left: calc(50% - 18px); width: 36px; height: 4px; border-radius: 4px; background: var(--border); }
  .mobile-word-handle > span:nth-child(2) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mobile-word-handle svg { width: 16px; height: 16px; flex-shrink: 0; }
  .reader--portal:not(.reader--demo) .reader-float__box { height: auto; background: transparent; border-radius: 0; }
  .reader--portal:not(.reader--demo) .reader-float:not(.is-definition-open) .reader-float__box { display: none; }
  .reader--portal:not(.reader--demo) .reader-float__box > img { display: none; }
  .reader--portal:not(.reader--demo) .reader-float__card { position: relative; padding: 10px 18px 16px; }
  .reader--portal:not(.reader--demo) .reader-float__hebrew { --definition-font-max: 2; font-size: 2rem; min-height: 0; line-height: 1.2; }
  .reader--portal:not(.reader--demo) .reader-float__speaker { width: 42px; height: 42px; }
  .reader--portal:not(.reader--demo) .reader-float__roman { font-size: 15px; margin-top: 4px; }
  .reader--portal:not(.reader--demo) .reader-float__gloss { font-size: 18px; margin-top: 6px; }
  .reader--portal:not(.reader--demo) .reader-float__tags { margin-top: 8px; font-size: 13px; gap: 2px; }
  .reader--portal:not(.reader--demo) .reader-float__actions { margin-top: 12px; width: 100%; gap: 6px; }
  .reader--portal:not(.reader--demo) .reader-float__save-area { --save-area-h: 58px; }
  .reader--portal:not(.reader--demo) .reader-float__links .reader-float__action--secondary { --btn-h: 44px; }
  .reader--portal:not(.reader--demo) .reader-audio { order: -2; height: 62px; border-radius: 0; background: transparent; }
  .reader--portal:not(.reader--demo) .reader-audio__body { display: none; }
  .reader--portal:not(.reader--demo) .reader-audio__controls { padding: 4px 16px 10px; gap: 12px; }
  .reader--portal:not(.reader--demo) .reader-audio__play { width: 44px; height: 44px; flex-basis: 44px; }
  .reader--portal:not(.reader--demo) .reader-audio__times { font-size: 11px; }
  .reader--portal:not(.reader--demo) .reader-audio__track { min-height: 10px; }
}
.mobile-reader-settings { box-sizing: border-box; position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; max-height: 85dvh; margin: 0; border: 1px solid var(--border); border-radius: 22px 22px 0 0; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); background: var(--bg); color: var(--text); font-family: var(--font-sans); overscroll-behavior: contain; }
.mobile-reader-settings::backdrop { background: rgb(32 37 31 / 35%); }
.mobile-reader-settings header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.mobile-reader-settings h2 { margin: 0; font-size: 16px; }
.mobile-reader-settings header button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 14px; background: var(--surface-muted); font-size: 22px; color: var(--text); cursor: pointer; }
.mobile-reader-settings .reader__controls { display: flex; flex-direction: column; align-items: stretch; width: 100%; margin: 0; padding: 0; gap: 0; font-size: 14px; }
.mobile-reader-settings .reader__rule { display: none; }
.mobile-reader-settings .reader__sizes { display: flex; gap: 8px; padding-bottom: 8px; }
.mobile-reader-settings .reader__sizes button { flex: 1; width: auto; height: auto; min-height: 36px; }
.mobile-reader-settings .reader__toggle { display: flex; flex-direction: row-reverse; justify-content: space-between; min-height: 40px; border-top: 1px solid var(--border); }
.mobile-reader-settings .reader__toggle-text { font-size: 14px; }

.account-subpage > a:first-child { color: var(--text); display: inline-block; margin-bottom: 20px; }
.account-subpage p { line-height: 1.65; }
.account-subpage article { padding: 24px 0; border-bottom: 1px solid var(--border); }
.account-subpage time { font-size: 13px; color: var(--text-disabled); }
@media (max-width: 760px) {
  .mobile-reader-header__title { color: #68705f; }
  .reader--portal:not(.reader--demo) .reader-float__card { gap: 0; }
  .reader--portal:not(.reader--demo) .reader-float__gloss { margin-top: 6px; font-size: 18px; }
  .reader--portal:not(.reader--demo) .reader-float.is-definition-open .reader-float__box { animation: mobile-word-reveal 160ms ease-out; }
  .reader--portal:not(.reader--demo) .reader__sentence + .reader__sentence { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
  .reader--portal:not(.reader--demo) .reader__sentence,
  .reader--portal:not(.reader--demo) .reader__hebrew.is-translations-on .reader__sentence,
  .reader--portal:not(.reader--demo) .reader__sentence.reader__sentence--veiled { padding-right: 0; }
  .reader--portal:not(.reader--demo) .reader__sentence-play { width: 44px; height: 44px; }
  .reader--portal:not(.reader--demo) .reader__sentence-translate { width: auto; height: 32px; min-width: 32px; }
  .reader--portal:not(.reader--demo) .reader__sentence--no-audio { padding-right: 0; }
  .reader--portal:not(.reader--demo) .reader__sentence--no-audio:has(.reader__sentence-translate) { padding-right: 0; }
  .reader--portal:not(.reader--demo) .reader__sentence .reader__line { overflow-wrap: anywhere; }
  .vocab-form__card { max-width: 100%; overflow-x: auto; }
  .premium-page__close { min-width: 44px; min-height: 44px; }
}
@keyframes mobile-word-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .reader--portal:not(.reader--demo) .reader-float.is-definition-open .reader-float__box { animation: none; } }

/* Mobile reader interactions have their own structure, not a scaled sidebar. */
.mobile-word-dock, .mobile-profile-back { display: none; }
@media (max-width: 760px) {
  .mobile-portal-nav .nav-icon { width: 25px; height: 25px; background-color: currentColor; }
  .mobile-profile-links .nav-icon { width: 30px; height: 30px; }
  .mobile-profile-back { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px 8px 8px; min-height: 44px; box-sizing: border-box; border-radius: 24px; color: var(--text); background: var(--surface-muted); text-decoration: none; font-weight: 600; }
  .mobile-profile-back svg { width: 22px; height: 22px; }
  .reader--portal:not(.reader--demo) .reader-float--desktop { display: none; }
  .mobile-reader-header { --hero-height: clamp(240px, 62.5vw, 390px); --toolbar-height: calc(72px + env(safe-area-inset-top)); position: sticky; top: calc(var(--toolbar-height) - var(--hero-height)); z-index: 30; height: auto; margin-bottom: 40px; background: var(--bg); }
  .mobile-reader-header__cover { height: var(--hero-height); }
  .mobile-reader-header__cover::after { background: linear-gradient(transparent, rgb(32 37 31 / 70%)); }
  .mobile-reader-header__meta { opacity: max(0, calc(1 - var(--collapse) * 2.2)); }
  .mobile-reader-header__level { display: inline-block; background: rgb(32 37 31 / 65%); padding: 4px 8px; border-radius: 7px; }
  .mobile-reader-header__toolbar { height: var(--toolbar-height); box-sizing: border-box; padding: calc(12px + env(safe-area-inset-top)) 16px 16px; background: rgb(32 37 31 / calc(var(--collapse) * .72)); border: 0; }
  .mobile-reader-header__toolbar > a { flex-basis: auto; padding: 0 12px 0 6px; display: flex; gap: 0; font-size: 14px; }
  .mobile-reader-header__toolbar > a, .mobile-reader-header__toolbar > button { border-radius: 24px; border: 1px solid rgb(255 255 255 / 40%); background: rgb(252 252 249 / 94%); }
  .mobile-reader-header__title { color: #fff; opacity: min(1, calc(var(--collapse) * 2)); }
  .mobile-reader-header__audio { position: relative; border-bottom: 1px solid var(--border); background: var(--bg); }
  .reader--portal .mobile-reader-header__audio .reader-audio { margin: 0; height: 70px; width: 100%; }
  .reader--portal .mobile-reader-header__audio .reader-audio__controls { box-sizing: border-box; padding: 10px 20px; }
  .mobile-word-dock { display: block; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; }

}
@keyframes word-sheet-enter { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mobile-word-sheet { animation: none; } }

/* Shared mobile page rhythm and action surfaces. */
@media (max-width: 760px) {
  .portal-with-tabs > .main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .library, .vocab-page { padding: calc(28px + env(safe-area-inset-top)) 20px 28px; }
  .library { gap: 40px; }
  .library-section h2, .vocab-page h1, .continue-page h1 { font: 700 28px/1.25 var(--font-sans); letter-spacing: -.4px; }
  .library-section-heading { gap: 12px; align-items: center; }
  .library-section-heading .portal-action, .portal-back, .vocab-back { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 15px; background: var(--surface-muted); color: var(--text); font: 700 13px/1.3 var(--font-sans); text-decoration: none; white-space: nowrap; }
  .portal-back { align-self: flex-start; padding-left: 8px; }
  .portal-back svg, .vocab-back svg { width: 20px; height: 20px; }
  .vocab-back { margin: 0 0 24px; align-self: flex-start; }
  .story-filters { gap: 10px; }
  .story-search, .story-dropdown__btn, .vocab-search { min-height: 48px; border-radius: 15px; }
  .story-grid, .continue-lead { gap: 16px 12px; }
  .story-card__body { padding: 12px; }
  .story-card__title { line-height: 1.3; }
  .story-card__meta { margin-top: 8px; font-size: 12px; line-height: 1.5; }
  .continue-page { gap: 24px; }
  .continue-page .continue-tools, .learning-page .continue-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0; }
  .continue-selection-count { display: block; font-size: 12px; color: #686F64; }
  .continue-page .continue-tools__actions, .learning-page .continue-tools__actions { display: none; }
  .continue-page.has-selection, .learning-page.has-selection { padding-bottom: 96px; }
  .continue-page.has-selection .continue-tools__actions, .learning-page.has-selection .continue-tools__actions { display: grid; grid-template-columns: 1fr 1fr; position: fixed; z-index: 39; left: 0; right: 0; bottom: calc(82px + env(safe-area-inset-bottom)); width: auto; padding: 14px 16px; gap: 10px; background: var(--bg); border-top: 1px solid var(--border); box-shadow: 0 -4px 24px rgb(32 37 31 / 6%); }
  .continue-page .continue-tools__actions button, .learning-page .continue-tools__actions button { min-height: 44px; padding: 12px 14px; border-radius: 999px; font: 700 14px/1.35 var(--font-sans); white-space: nowrap; }
  .continue-page .continue-tools__actions .continue-remove:not(:disabled), .learning-page .continue-tools__actions .continue-remove:not(:disabled) { background: #b5584f; color: #fff; }
  .vocab-page h1 { margin: 0 0 24px; }
  .vocab-tools { gap: 16px; }
  .vocab-filters { grid-template-columns: .85fr .85fr 1.35fr 1fr; gap: 4px; }
  .vocab-filters > .vocab-pill { padding-inline: 4px; font-size: 12px; border-radius: 12px; }
  .vocab-filters .vocab-type { margin-top: 8px; }
  .vocab-type__btn { min-height: 46px; border-radius: 14px; }
  .vocab-row { padding: 20px 0; }
  .vocab-status__btn { font-size: 12px; min-height: 44px; }
  .vocab-menu button { min-height: 46px; padding: 10px 12px; }
  .mobile-portal-nav > a { color: #777C73; border-radius: 0; gap: 5px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .mobile-portal-nav > a > span { background: none; border-radius: 0; color: inherit; }
  .mobile-portal-nav > a[aria-current='page'], .mobile-portal-nav > a[aria-current='page'] > span { color: var(--primary); background: none; }
  .portal-action, .portal-back, .mobile-profile-back, .account-profile__summary button, .account-profile__cancel, .account-logout button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .portal-action:active, .portal-back:active, .mobile-profile-links a:active { background: var(--surface-hover); }
  .portal-profile :is(button, a, input):focus-visible, .portal-action:focus-visible, .portal-back:focus-visible, .mobile-portal-nav a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
}
@media (max-width: 760px) {
  .account-profile__summary-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .account-profile__summary-line strong { min-width: 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .account-profile__summary-line > button { flex-shrink: 0; padding: 8px 12px; }
  .account-profile__summary > p { margin-top: 4px; }
  .mobile-story-search { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 15px; background: var(--surface-muted); color: var(--text); font: 400 16px var(--font-sans); text-align: left; }
  .mobile-story-search svg { width: 20px; height: 20px; flex-shrink: 0; }
  .mobile-story-search span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .vocab-list { margin-top: 24px; }
  .vocab-row { grid-template-columns: minmax(0, 1fr) 48px; grid-template-rows: auto auto; gap: 12px 14px; align-items: start; padding: 22px 0; cursor: default; }
  .vocab-row > .vocab-word { grid-column: 1; grid-row: 1; padding: 0; }
  .vocab-row > .vocab-speaker { grid-column: 2; grid-row: 1; width: 48px; height: 48px; min-height: 48px; border-radius: 15px; }
  .vocab-row > .vocab-status { grid-column: 1 / -1; grid-row: 2; justify-self: start; width: auto; }
  .vocab-row .vocab-status__btn { min-height: 44px; min-width: 126px; padding: 10px 14px; border-radius: 13px; font-size: 13px; }
  .vocab-row .vocab-hebrew { font-size: 30px; line-height: 1.35; }
  .vocab-row .vocab-gloss { margin-top: 6px; line-height: 1.5; }
  .vocab-row .vocab-rom { font-size: 14px; color: #686F64; }
  .vocab-row .vocab-en { margin-top: 4px; font-size: 16px; color: var(--text); }
  .vocab-type { justify-self: stretch; width: 100%; min-width: 0; }
  .vocab-type__btn { padding-inline: 14px; }
}
@media (max-width: 760px) {
  .vocab-filters .vocab-type { grid-column: 1 / -1; width: 100%; justify-self: stretch; }
  .vocab-type .vocab-type__btn { width: 100%; min-height: 48px; padding: 12px 16px; justify-content: space-between; font-size: 14px; }
  .vocab-type__btn:focus:not(:focus-visible) { outline: none; }
  .portal-profile .account-profile { min-height: 144px; }
  .portal-profile .account-profile.is-editing .account-profile__summary { display: none; }
  .portal-profile .account-profile.is-editing .account-profile__fields { grid-column: 2; grid-row: 1; }
  .portal-profile .account-profile__name-label { display: none; }
  .portal-profile .account-profile__name { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .portal-profile .account-profile__name input { grid-column: 1 / -1; }
  .portal-profile .account-profile__name button { min-width: 0; width: 100%; height: 44px; padding: 8px; font-size: 14px; white-space: nowrap; }
  .portal-profile .account-profile__name .account-profile__cancel { display: flex; margin: 0; background: var(--surface-muted); color: var(--text); }
  .portal-profile .account-profile__email { display: block; margin-top: 8px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
}
@media (max-width: 760px) {
  .library-section--mascot .story-toolbar > h2 { white-space: nowrap; }
}
