/* =========================================================
   Reader features (js/reader.js, inc/reader.php)
   Save hearts · Saved button + panel · Recently viewed · Compare tray · toast
   ========================================================= */
:root {
    --ls-r-navy: #071d33;
    --ls-r-blue: #0b5fd8;
    --ls-r-heart: #ef4444;
    --ls-r-line: #dbe7f7;
    --ls-r-muted: #4a5d7a;
    --ls-r-green: #22a05a;
    --ls-r-orange: #ff8a3d;
}

/* ---------- Heart button ---------- */
.ls-save[hidden] { display: none !important; }
.ls-save {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 36px; height: 36px; padding: 0; margin: 0;
    border: 1px solid var(--ls-r-line); border-radius: 50%;
    background: rgba(255, 255, 255, .94); color: #8a9bb5;
    box-shadow: 0 2px 8px rgba(7, 29, 51, .1);
    cursor: pointer; line-height: 1; font: inherit;
    transition: transform .15s ease, color .15s ease, border-color .15s ease, background-color .15s ease;
}
.ls-save svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ls-save:hover, .ls-save:focus-visible { color: var(--ls-r-heart); border-color: #f6b4b4; }
.ls-save:focus-visible { outline: 2px solid var(--ls-r-blue); outline-offset: 2px; }
.ls-save.is-saved { color: var(--ls-r-heart); border-color: #f6b4b4; background: #fff5f5; }
.ls-save.is-saved svg { fill: currentColor; }
.ls-save:active { transform: scale(.9); }
.ls-save.is-saved svg { animation: ls-heart-pop .32s ease; }
@keyframes ls-heart-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* On cards: top corner (category/brand cards keep the New/Rumored badge on the left; Finder cards on the right). */
.ls-arch-card { position: relative; }
.ls-save.is-card { position: absolute; top: 8px; right: 8px; z-index: 2; }
.ls-save.is-finder { position: absolute; top: 6px; left: 6px; z-index: 3; width: 34px; height: 34px; }
.ls-save.is-finder svg { width: 18px; height: 18px; }

/* Device page: a small round heart over the photo, top right. */
.ls-hero-image { position: relative; }
.ls-save.is-hero { position: absolute; top: 6px; right: 6px; z-index: 3; width: 34px; height: 34px; }
.ls-save.is-hero svg { width: 18px; height: 18px; }

/* ---------- Header "Saved" button ---------- */
.ls-saved-btn {
    position: relative; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
    height: 38px; padding: 0 14px 0 12px; margin: 0 0 0 14px;
    border: 1.5px solid rgba(255, 255, 255, .85); border-radius: 999px;
    background: rgba(255, 255, 255, .06); color: #fff;
    font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer;
}
.ls-saved-btn:hover, .ls-saved-btn:focus-visible { background: rgba(255, 255, 255, .14); color: #fff; }
.ls-saved-btn:focus-visible { outline: 2px solid #5aa2ff; outline-offset: 2px; }
.ls-saved-btn svg { width: 18px; height: 18px; fill: #ff5a5f; stroke: none; }
.ls-saved-count {
    min-width: 19px; height: 19px; padding: 0 5px; box-sizing: border-box; border-radius: 10px;
    background: var(--ls-r-orange); color: #fff; font-size: 11px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
}
.ls-saved-count[hidden] { display: none; }
@media (min-width: 769px) {
    .site-header .inside-header > .ls-saved-btn {
        order: 4; grid-column: 4; grid-row: 1; justify-self: end; align-self: center;
        width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; border-width: 1.5px; border-color: rgba(255, 255, 255, .45);
    }
    .site-header .inside-header > .ls-saved-btn .ls-saved-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .site-header .inside-header > .ls-saved-btn .ls-saved-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; font-size: 10.5px; border: 2px solid #071d33; }
}
@media (max-width: 768px) {
    .site-header .inside-header > .ls-saved-btn {
        position: absolute; top: 50%; right: 52px; z-index: 10; transform: translateY(-50%);
        width: 40px; height: 40px; padding: 0; margin: 0; justify-content: center;
        border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 6px; background: rgba(255, 255, 255, .06);
    }
    .site-header .inside-header > .ls-saved-btn svg { width: 21px; height: 21px; }
    .ls-saved-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .ls-saved-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; font-size: 10.5px; border: 2px solid #071d33; }
}

/* ---------- Recently viewed strip ---------- */
.ls-recent[hidden] { display: none !important; }
.ls-recent {
    box-sizing: border-box; margin: 0 0 18px; padding: 14px 16px 12px;
    border: 1px solid var(--ls-r-line); border-radius: 14px; background: #fff;
    min-width: 0; max-width: 100%;
}
.ls-recent.is-device { margin: 20px 0 0; }
.ls-recent.is-home { margin: 18px 0; }
.ls-recent.is-finder { margin: 0 0 14px; }
.ls-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.ls-recent-title { margin: 0 !important; padding: 0 !important; border: 0 !important; color: var(--ls-r-navy); font-size: 16px !important; line-height: 1.25 !important; font-weight: 800 !important; }
.ls-recent-clear { min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ls-r-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ls-recent-clear:hover, .ls-recent-clear:focus-visible { background: #eef4fd; color: var(--ls-r-blue); }
.ls-recent-track {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 6px;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.ls-recent-item {
    flex: 0 0 auto; display: flex; align-items: center; gap: 10px; width: 210px; box-sizing: border-box;
    padding: 8px 12px 8px 8px; border: 1px solid #e3ecf8; border-radius: 12px; background: #f9fbff;
    color: var(--ls-r-navy); text-decoration: none; scroll-snap-align: start;
    transition: border-color .15s ease, background-color .15s ease;
}
.ls-recent-item:hover, .ls-recent-item:focus-visible { border-color: var(--ls-r-blue); background: #fff; color: var(--ls-r-navy); }
.ls-recent-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ls-recent-text strong { font-size: 13.5px; line-height: 1.3; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ls-recent-text small { color: #667085; font-size: 12px; }

.ls-r-thumb {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 52px; border-radius: 8px; background: #fff; overflow: hidden;
}
.ls-r-thumb img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ls-r-thumb.is-empty { background: #eef4fd; }
.ls-r-thumb.is-empty svg, .ls-tray-thumb.is-empty svg { width: 22px; height: 22px; fill: none; stroke: #8aa4c8; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- Compare tray ---------- */
.ls-tray[hidden] { display: none !important; }
.ls-tray {
    position: fixed; left: 50%; bottom: 14px; z-index: 990; transform: translateX(-50%);
    box-sizing: border-box; width: min(860px, calc(100% - 24px));
    display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 12px;
    border-radius: 16px; background: var(--ls-r-navy); color: #fff;
    box-shadow: 0 14px 36px rgba(7, 29, 51, .35);
    animation: ls-tray-in .22s ease;
}
@keyframes ls-tray-in { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.ls-tray-items { flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.ls-tray-item {
    position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0;
    padding: 6px 30px 6px 6px; border-radius: 11px; background: rgba(255, 255, 255, .08);
}
.ls-tray-item.is-empty { padding-right: 10px; border: 1.5px dashed rgba(255, 255, 255, .28); background: transparent; color: #a9bdd8; }
.ls-tray-thumb { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 40px; border-radius: 7px; background: #fff; overflow: hidden; }
.ls-tray-thumb img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.ls-tray-plus { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 40px; border-radius: 7px; background: rgba(255, 255, 255, .08); font-size: 20px; font-weight: 700; }
.ls-tray-name { min-width: 0; overflow: hidden; color: inherit; font-size: 13px; line-height: 1.25; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ls-tray-remove {
    position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
    width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: #c4d4ea; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.ls-tray-remove:hover, .ls-tray-remove:focus-visible { background: rgba(255, 255, 255, .15); color: #fff; }
.ls-tray-remove svg, .ls-panel-x svg, .ls-panel-remove svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ls-tray-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.ls-tray-hint { color: #a9bdd8; font-size: 12.5px; font-weight: 600; max-width: 150px; line-height: 1.3; }
.ls-tray-clear { min-height: 40px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ls-tray-clear:hover, .ls-tray-clear:focus-visible { background: rgba(255, 255, 255, .1); }
.ls-tray-go, .ls-tray-go:visited {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
    border-radius: 11px; background: var(--ls-r-green); color: #fff; text-decoration: none;
    font-size: 14px; font-weight: 800; white-space: nowrap;
}
.ls-tray-go:hover, .ls-tray-go:focus-visible { background: #1b8a4c; color: #fff; }
.ls-tray-go svg, .ls-panel-btn svg { width: 18px; height: 18px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ls-arch-compare.is-in-tray, .ls-pf-card-btn.is-in-tray { background: #e9f7ee !important; border-color: var(--ls-r-green) !important; color: #15803d !important; }
body.has-ls-tray { padding-bottom: 92px; }
@media (max-width: 700px) {
    .ls-tray { flex-direction: column; align-items: stretch; gap: 8px; bottom: 10px; padding: 10px; width: calc(100% - 16px); }
    .ls-tray-item { flex-direction: column; align-items: center; text-align: center; padding: 6px 4px 6px; gap: 5px; }
    .ls-tray-item.is-empty { padding: 6px 4px; }
    .ls-tray-name { font-size: 11.5px; -webkit-line-clamp: 2; }
    .ls-tray-remove { top: 2px; right: 2px; transform: none; width: 24px; height: 24px; background: rgba(7, 29, 51, .6); }
    .ls-tray-actions { justify-content: space-between; }
    .ls-tray-hint { max-width: none; flex: 1 1 auto; }
    .ls-tray-go { min-height: 42px; padding: 0 14px; }
    body.has-ls-tray { padding-bottom: 168px; }
}

/* ---------- Saved panel ---------- */
.ls-panel[hidden] { display: none !important; }
.ls-panel { position: fixed; inset: 0; z-index: 100000; }
html.ls-panel-open { overflow: hidden; }
.ls-panel-backdrop { position: absolute; inset: 0; background: rgba(7, 29, 51, .5); opacity: 0; transition: opacity .2s ease; }
.ls-panel.is-open .ls-panel-backdrop { opacity: 1; }
.ls-panel-sheet {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
    display: flex; flex-direction: column; background: #f4f7fc; color: var(--ls-r-navy);
    box-shadow: -12px 0 36px rgba(7, 29, 51, .25);
    transform: translateX(100%); transition: transform .24s ease; outline: none;
}
.ls-panel.is-open .ls-panel-sheet { transform: none; }
.ls-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 12px; background: var(--ls-r-navy); color: #fff; }
.ls-panel-title { margin: 0 !important; color: #fff !important; font-size: 19px !important; font-weight: 800 !important; }
.ls-panel-x { width: 40px; height: 40px; padding: 0; border: 1.5px solid rgba(255, 255, 255, .4); border-radius: 10px; background: transparent; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ls-panel-x svg { width: 18px; height: 18px; }
.ls-panel-x:hover, .ls-panel-x:focus-visible { background: rgba(255, 255, 255, .12); }
.ls-panel-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 12px 16px 4px; padding: 4px; border-radius: 12px; background: #e3ecf8; }
.ls-panel-tabs button { min-height: 40px; padding: 0 6px; line-height: 1.2; border: 0; border-radius: 9px; background: transparent; color: var(--ls-r-muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ls-panel-tabs button.is-on { background: #fff; color: var(--ls-r-navy); box-shadow: 0 2px 8px rgba(7, 29, 51, .1); }
.ls-panel-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 16px 12px; }
.ls-panel-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ls-panel-item { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 8px 8px 12px; border: 1px solid var(--ls-r-line); border-radius: 12px; background: #fff; }
.ls-panel-item.is-picked { border-color: var(--ls-r-blue); background: #f5f9ff; }
.ls-panel-check { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: var(--ls-r-blue); cursor: pointer; }
.ls-panel-link { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ls-r-navy); text-decoration: none; }
.ls-panel-link:hover strong, .ls-panel-link:focus-visible strong { color: var(--ls-r-blue); }
.ls-panel-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ls-panel-text strong { font-size: 14px; line-height: 1.3; font-weight: 700; }
.ls-panel-text small { color: #667085; font-size: 12px; }
.ls-panel-remove { flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: #f4f7fc; color: var(--ls-r-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ls-panel-remove:hover, .ls-panel-remove:focus-visible { background: #fdecec; color: #c62828; }
.ls-panel-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px 16px; border-top: 1px solid var(--ls-r-line); background: #fff; }
.ls-panel-foot:empty { display: none; }
.ls-panel-note { color: var(--ls-r-muted); font-size: 13px; font-weight: 600; }
.ls-panel-small { flex-basis: 100%; margin: 0; color: #667085; font-size: 12px; line-height: 1.4; }
.ls-panel-btn, .ls-panel-btn:visited {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
    border-radius: 11px; background: var(--ls-r-green); color: #fff; text-decoration: none; font-size: 14px; font-weight: 800;
}
.ls-panel-btn svg path:first-child { stroke: #fff; }
.ls-panel-btn svg path:last-child { stroke: #fff; }
.ls-panel-btn:hover, .ls-panel-btn:focus-visible { background: #1b8a4c; color: #fff; }
.ls-panel-btn.is-off { background: #c9d5e6; color: #4a5d7a; cursor: not-allowed; pointer-events: none; }
.ls-panel-btn.is-off svg path { stroke: #4a5d7a; }
.ls-panel-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 12px; text-align: center; }
.ls-panel-empty strong { font-size: 16px; }
.ls-panel-empty p { margin: 0 0 6px; color: var(--ls-r-muted); font-size: 14px; }
.ls-panel-empty-icon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; background: #fdecec; align-items: center; justify-content: center; }
.ls-panel-empty-icon svg { width: 28px; height: 28px; fill: var(--ls-r-heart); }
.ls-panel-empty .ls-panel-btn { background: var(--ls-r-blue); }

/* ---------- Toast ---------- */
.ls-r-toast {
    position: fixed; left: 12px; right: 12px; bottom: 22px; z-index: 100001; transform: translateY(20px);
    width: -moz-fit-content; width: fit-content; margin: 0 auto;
    display: flex; align-items: center; gap: 10px; max-width: 560px; box-sizing: border-box;
    padding: 10px 12px 10px 12px; border-radius: 12px; background: var(--ls-r-navy); color: #fff;
    font-size: 14px; font-weight: 600; box-shadow: 0 10px 28px rgba(7, 29, 51, .3);
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.ls-r-toast.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ls-r-toast > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
body.has-ls-tray .ls-r-toast { bottom: 100px; }
@media (max-width: 700px) { body.has-ls-tray .ls-r-toast { bottom: 176px; } }
.ls-r-toast-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: #a9bdd8; stroke-width: 2; }
.ls-r-toast-icon.is-good svg { fill: #ff5a5f; stroke: none; }
.ls-r-toast-link { min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ls-r-toast-link:hover, .ls-r-toast-link:focus-visible { background: rgba(255, 255, 255, .22); }

@media (prefers-reduced-motion: reduce) {
    .ls-save, .ls-tray, .ls-panel-sheet, .ls-panel-backdrop, .ls-r-toast { transition: none; animation: none; }
    .ls-save.is-saved svg { animation: none; }
}

/* ---------- Header: Sign in / account avatar (computers; on phones it lives in the Saved panel) ---------- */
.ls-signin-link, .ls-signin-link:visited {
    display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; height: 38px; padding: 0 12px; margin: 0 0 0 14px;
    border-radius: 999px; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none;
}
.ls-signin-link:hover, .ls-signin-link:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
.ls-signin-link svg { width: 18px; height: 18px; fill: none; stroke: #5aa2ff; stroke-width: 2.2; stroke-linecap: round; }
.ls-signin-link.is-user { padding: 0; width: 38px; justify-content: center; }
.ls-signin-avatar { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: #ff8a3d; color: #fff; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.ls-signin-link + .ls-saved-btn { margin-left: 8px; }
@media (min-width: 769px) {
    .site-header .inside-header > .ls-signin-link { order: 4; grid-column: 4; grid-row: 1; align-self: center; }
}
@media (max-width: 768px) {
    .site-header .inside-header > .ls-signin-link { display: none; }
}

/* Saved panel: who is signed in */
.ls-panel-account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 16px 0; padding: 10px 12px; border: 1px solid var(--ls-r-line); border-radius: 12px; background: #fff; }
.ls-panel-account:empty { display: none; }
.ls-panel-avatar { flex: 0 0 auto; display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: var(--ls-r-orange); color: #fff; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.ls-panel-account-text { flex: 1 1 150px; min-width: 0; color: #33465f; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.ls-panel-account-link, .ls-panel-account-link:visited { color: var(--ls-r-blue); font-size: 13.5px; font-weight: 800; text-decoration: none; }
.ls-panel-account-link.is-btn, .ls-panel-account-link.is-btn:visited { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 9px; background: var(--ls-r-blue); color: #fff; }
.ls-panel-account-link.is-btn:hover, .ls-panel-account-link.is-btn:focus-visible { background: #0849ad; color: #fff; }

/* Save on stories and reviews: a small pill in the author / date line. */
.ls-save.is-meta {
    width: auto; height: 30px; padding: 0 11px 0 9px; border-radius: 999px; box-shadow: none;
    font-size: 12px; font-weight: 700; color: #33465f; background: #fff;
}
.ls-save.is-meta svg { width: 16px; height: 16px; }
.ls-nhero .ls-save.is-meta { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08); color: #fff; }
.ls-nhero .ls-save.is-meta:hover, .ls-nhero .ls-save.is-meta:focus-visible { border-color: #fff; background: rgba(255, 255, 255, .16); color: #fff; }
.ls-nhero .ls-save.is-meta.is-saved { border-color: #ff8a8a; background: rgba(239, 68, 68, .18); color: #fff; }
.ls-nhero .ls-save.is-meta.is-saved svg { color: #ff6b6b; }
.ls-save.is-meta.is-saved { color: var(--ls-r-heart); }
/* In the story's details line the Save button is a small heart (computers). */
@media (min-width: 761px) {
    .ls-nhero-meta .ls-save.is-meta { width: 30px; padding: 0; justify-content: center; }
    .ls-nhero-meta .ls-save.is-meta .ls-save-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* The Google buttons sit on the same line as the author and other details. */
.ls-nhero-meta .ls-gbtns { display: inline-flex; width: auto; }
@media (max-width: 760px) {
    .ls-nhero-meta .ls-gbtns { display: flex; flex-basis: 100%; }
}
/* Saved panel: stories and reviews */
.ls-panel-item.is-article { padding-left: 8px; }
.ls-r-thumb.is-wide { width: 64px; height: 44px; }
.ls-r-thumb.is-wide img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.ls-panel-kind { color: var(--ls-r-blue) !important; font-size: 11px !important; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }

/* ---------- Hover / focus colours (WordPress's default button style would turn these blue) ---------- */
.ls-save:hover, .ls-save:focus, .ls-save:active { background-color: #fff5f5; color: var(--ls-r-heart); border-color: #f6b4b4; }
.ls-nhero .ls-save.is-meta:focus, .ls-nhero .ls-save.is-meta:active { background-color: rgba(255, 255, 255, .16); color: #fff; }
.ls-saved-btn:focus, .ls-saved-btn:active { background-color: rgba(255, 255, 255, .14); color: #fff; }
.ls-panel-tabs button:hover, .ls-panel-tabs button:focus { background: rgba(255, 255, 255, .6); color: var(--ls-r-navy); }
.ls-panel-tabs button.is-on, .ls-panel-tabs button.is-on:hover, .ls-panel-tabs button.is-on:focus { background: #fff; color: var(--ls-r-navy); }
.ls-panel-x:focus, .ls-panel-x:active { background: rgba(255, 255, 255, .12); color: #fff; }
.ls-panel-remove:focus, .ls-panel-remove:active { background: #fdecec; color: #c62828; }
.ls-tray-remove:focus, .ls-tray-remove:active { background: rgba(255, 255, 255, .15); color: #fff; }
.ls-tray-clear:focus, .ls-tray-clear:active { background: rgba(255, 255, 255, .1); color: #fff; }
.ls-recent-clear:focus, .ls-recent-clear:active { background: #eef4fd; color: var(--ls-r-blue); }
.ls-r-toast-link:focus, .ls-r-toast-link:active { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- Phones: account + Saved buttons in the mobile header ---------- */
.ls-m-account { display: none; }
@media (max-width: 768px) {
    .ls-m-account, .ls-m-account:visited, .ls-saved-btn.is-mobile {
        display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
        width: 40px; height: 40px; padding: 0; margin: 0; box-sizing: border-box;
        border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 6px; background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none;
    }
    .ls-m-account:hover, .ls-m-account:focus { background: rgba(255, 255, 255, .14); color: #fff; }
    .ls-m-account svg { width: 21px; height: 21px; fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; }
    .ls-m-account.is-user { border-color: transparent; background: transparent; }
    .ls-m-account .ls-signin-avatar.is-small { width: 34px; height: 34px; font-size: 13px; }
    /* Theme's own mobile header: account beside the menu button (left), heart beside search (right). */
    .site-header .inside-header > .ls-m-account { position: absolute; top: 50%; left: 52px; z-index: 10; transform: translateY(-50%); }
    /* GeneratePress mobile header (a 3-column grid: menu | logo | search): wider side columns,
       account beside the menu button, heart beside search. */
    #mobile-header.has-ls-m .inside-navigation { grid-template-columns: 90px minmax(0, 1fr) 90px !important; }
    #mobile-header .ls-m-left { grid-column: 1 !important; grid-row: 1 !important; justify-self: end !important; order: 1; }
    #mobile-header .ls-m-right { grid-column: 3 !important; grid-row: 1 !important; justify-self: start !important; order: 3; }
    #mobile-header.has-ls-m .menu-bar-items, #mobile-header.has-ls-m .mobile-bar-items { grid-column: 3 !important; grid-row: 1 !important; justify-self: end !important; margin-right: 0 !important; }
    .ls-saved-btn.is-mobile { position: relative; }
    .ls-saved-btn.is-mobile svg { width: 21px; height: 21px; }
    .ls-saved-btn.is-mobile .ls-saved-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .ls-saved-btn.is-mobile .ls-saved-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; font-size: 10.5px; border: 2px solid #071d33; }
}
.ls-signin-avatar.is-small { width: 26px; height: 26px; font-size: 11px; flex: 0 0 auto; }
/* The header's own Login button once logged in: initials + "My account". */
.ls-auth-is-user { display: inline-flex !important; align-items: center; gap: 7px; }
/* Menu-link styles of the GeneratePress mobile header must not stretch these buttons. */
@media (max-width: 768px) {
    #mobile-header .ls-m-account, #mobile-header .ls-saved-btn {
        display: inline-flex !important; position: relative; width: 40px !important; height: 40px !important; min-width: 40px;
        padding: 0 !important; margin: 0 !important; line-height: 1 !important; float: none !important; overflow: visible;
    }
    #mobile-header .ls-m-account svg, #mobile-header .ls-saved-btn svg { display: block; flex: 0 0 auto; }
}

/* =========================================================
   Header buttons printed with the page (inc/reader.php): no layout shift.
   ========================================================= */
/* People register from the Login page: the header's Register button is not shown.
   Once logged in, the header's Login button gives way to "My account". */
.site-header a[href*="/register"], #mobile-header a[href*="/register"] { display: none !important; }
body.logged-in .site-header a[href*="/login"], body.logged-in #mobile-header a[href*="/login"] { display: none !important; }

.ls-head-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin: 0 0 0 14px; }
.ls-head-account, .ls-head-account:visited, .ls-head-login, .ls-head-login:visited {
    display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px; border-radius: 999px;
    color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.ls-head-account:hover, .ls-head-account:focus, .ls-head-login:hover, .ls-head-login:focus { background: rgba(255, 255, 255, .12); color: #fff; }
.ls-head-login svg { width: 18px; height: 18px; fill: none; stroke: #5aa2ff; stroke-width: 2.2; stroke-linecap: round; }
/* Our "Login" only when the header has none of its own. */
.site-header .inside-header:has(a[href*="/login"]:not(.ls-head-login):not(.ls-m-account)) .ls-head-login { display: none; }
@media (min-width: 769px) {
    .site-header .inside-header > .ls-head-tools { order: 4; grid-column: 4; grid-row: 1; justify-self: end; align-self: center; }
    .ls-head-tools .ls-saved-btn {
        position: relative; width: 38px; height: 38px; padding: 0; margin: 0; justify-content: center;
        border-radius: 50%; border-width: 1.5px; border-color: rgba(255, 255, 255, .45);
    }
    .ls-head-tools .ls-saved-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .ls-head-tools .ls-saved-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; font-size: 10.5px; border: 2px solid #071d33; }
}
@media (max-width: 768px) {
    .ls-head-account, .ls-head-login { display: none !important; }
    .ls-head-tools { margin: 0; }
    /* Theme's own phone header: heart beside the search button (the account button sits beside the menu). */
    .site-header .inside-header > .ls-head-tools .ls-saved-btn {
        position: absolute; top: 50%; right: 52px; z-index: 10; transform: translateY(-50%);
        width: 40px; height: 40px; padding: 0; margin: 0; justify-content: center;
        border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 6px; background: rgba(255, 255, 255, .06);
    }
    .site-header .inside-header > .ls-head-tools .ls-saved-btn svg { width: 21px; height: 21px; }
    .site-header .inside-header > .ls-head-tools .ls-saved-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .site-header .inside-header > .ls-head-tools .ls-saved-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; font-size: 10.5px; border: 2px solid #071d33; }
    /* GeneratePress phone header: wider side columns as soon as the buttons are there. */
    #mobile-header .inside-navigation:has(> .ls-m-left) { grid-template-columns: 90px minmax(0, 1fr) 90px !important; }
    #mobile-header .inside-navigation:has(> .ls-m-left) > .menu-bar-items,
    #mobile-header .inside-navigation:has(> .ls-m-left) > .mobile-bar-items { grid-column: 3 !important; grid-row: 1 !important; justify-self: end !important; margin-right: 0 !important; }
}
/* Review image: the heart sits top right of the photo. */
.ls-rhero-media .ls-save.is-hero { top: 10px; right: 10px; }

/* Avatars with a photo (header, phone header, Saved panel). */
.ls-avatar { overflow: hidden; }
.ls-avatar.has-photo { background: #e8f0fd !important; padding: 0; }
.ls-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ls-signin-avatar { flex: 0 0 auto; }

/* Recently viewed: remove one, or clear all. */
.ls-recent-cell { position: relative; flex: 0 0 auto; scroll-snap-align: start; }
.ls-recent-cell .ls-recent-item { padding-right: 34px; }
.ls-recent-remove {
    position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: #8a9bb5; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.ls-recent-remove:hover, .ls-recent-remove:focus { background: #fdecec; color: #c62828; }
.ls-recent-remove svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.ls-panel-clear { display: block; margin: 12px auto 0; min-height: 38px; padding: 0 14px; border: 1px solid var(--ls-r-line); border-radius: 10px; background: #fff; color: #b42318; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ls-panel-clear:hover, .ls-panel-clear:focus { border-color: #b42318; background: #fff5f5; color: #b42318; }
/* Login / register / logout message */
.ls-r-toast-icon.is-check svg { width: 20px; height: 20px; fill: initial; stroke: none; }
