/* Khu bình luận Fox40. Màu lấy từ bảng màu của theme (theme.json), có giá trị dự phòng. */
.f40c {
	--c-ink: var(--wp--preset--color--contrast, #14202b);
	--c-muted: var(--wp--preset--color--muted, #5b6770);
	--c-line: var(--wp--preset--color--border, #d9e0e6);
	--c-surface: var(--wp--preset--color--surface, #fff);
	--c-soft: var(--wp--preset--color--base-2, #f3f5f8);
	--c-accent: var(--wp--preset--color--accent, #1d4ed8);
	--c-accent-ink: var(--wp--preset--color--accent-ink, #fff);
	--c-ok: #15803d;
	--c-warn: #a16207;
	--c-no: #b91c1c;
	--c-star: #e3a008;
	--c-cyan: var(--wp--preset--color--cyan, #0891b2);
	--c-indent: 18px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	color: var(--c-ink);
	font-size: 1rem;
	line-height: 1.6;
	min-width: 0;
	scroll-margin-top: 90px;
}
.f40c *, .f40c *::before, .f40c *::after { box-sizing: border-box; }
.f40c [hidden] { display: none !important; }
.f40c button, .f40c select, .f40c input, .f40c textarea { font: inherit; color: inherit; }
.f40c .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

/* đầu khu */
.f40c-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.f40c-title { margin: 0; font-size: 1.35em; line-height: 1.25; }
.f40c-n { color: var(--c-muted); font-weight: 400; }
.f40c-own { font-size: .62em; font-weight: 400; color: var(--c-muted); white-space: nowrap; }
.f40c-sort { display: inline-flex; align-items: center; gap: 8px; font-size: .875em; color: var(--c-muted); }
.f40c-sort select { border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-surface); padding: 6px 10px; min-height: 36px; max-width: 100%; }

/* nút */
.f40c-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 16px; border: 1px solid var(--c-accent); border-radius: 8px; background: var(--c-accent); color: var(--c-accent-ink); font-weight: 600; text-decoration: none; cursor: pointer; }
.f40c-btn:hover { filter: brightness(.94); color: var(--c-accent-ink); }
/* Liên kết dạng nút: quy tắc màu liên kết của theme (ví dụ trong nội dung KB) không được tô đè chữ trên nút. */
a.f40c-btn, a.f40c-btn:hover, a.f40c-btn:focus, a.f40c-btn:visited { color: var(--c-accent-ink) !important; text-decoration: none !important; }
.f40c-btn:disabled { opacity: .55; cursor: default; }
.f40c-btn--sm { min-height: 32px; padding: 3px 12px; font-size: .875em; }
.f40c-link { background: none; border: 0; padding: 4px 6px; border-radius: 6px; color: var(--c-muted); font-size: .875em; cursor: pointer; }
.f40c-link:hover { color: var(--c-accent); background: var(--c-soft); }
.f40c :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* mời đăng nhập, sao */
.f40c-login { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border: 1px dashed var(--c-accent); border-radius: 12px; background: color-mix(in srgb, var(--c-accent) 7%, var(--c-surface)); }
.f40c-login span { flex: 1 1 220px; min-width: 0; }
.f40c-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-soft); }
.f40c-rate__q { font-weight: 600; }
.f40c-stars { display: inline-flex; }
.f40c-stars button { background: none; border: 0; padding: 2px 3px; font-size: 1.6em; line-height: 1; color: var(--c-line); cursor: pointer; }
.f40c-stars button[aria-pressed="true"] { color: var(--c-star); }
.f40c-stars button:disabled { cursor: default; }
.f40c-stars:hover button:not(:disabled) { color: var(--c-star); }
.f40c-stars button:not(:disabled):hover ~ button { color: var(--c-line); }
.f40c-rate__sum, .f40c-rate__me { font-size: .875em; color: var(--c-muted); }

/* khung soạn */
.f40c-form { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.f40c-form.is-reply { margin-top: 4px; }
.f40c-replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .875em; color: var(--c-muted); }
.f40c-guest { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.f40c-guest label { display: flex; flex-direction: column; gap: 3px; font-size: .875em; color: var(--c-muted); }
.f40c-guest input { border: 1px solid var(--c-line); border-radius: 8px; padding: 8px 10px; background: var(--c-surface); min-height: 40px; }
.f40c-ed { border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); overflow: visible; }
.f40c-ed:focus-within { border-color: var(--c-accent); }
.f40c-tb { position: relative; display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--c-line); background: var(--c-soft); border-radius: 12px 12px 0 0; }
.f40c-tb > button { display: inline-grid; place-items: center; width: 36px; height: 34px; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.f40c-tb > button:hover { background: var(--c-line); }
.f40c-tb__sep { width: 1px; margin: 5px 4px; background: var(--c-line); }
.f40c-ed textarea, .f40c-edit textarea { display: block; width: 100%; min-height: 76px; max-height: 50vh; max-height: 50dvh; padding: 10px 12px; border: 0; border-radius: 0 0 12px 12px; background: transparent; resize: vertical; line-height: 1.55; }
.f40c-ed textarea:focus { outline: none; }
.f40c-ef { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.f40c-ef .f40c-btn { margin-left: auto; }
.f40c-count { font-size: .8em; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.f40c-check { display: inline-flex; align-items: center; gap: 6px; font-size: .875em; color: var(--c-muted); cursor: pointer; }
.f40c-check input, .f40c-vis input { accent-color: var(--c-accent); }
.f40c-vis { display: inline-flex; margin: 0; padding: 0; border: 1px solid var(--c-line); border-radius: 8px; overflow: hidden; min-width: 0; }
.f40c-vis label { position: relative; cursor: pointer; }
.f40c-vis label + label { border-left: 1px solid var(--c-line); }
.f40c-vis input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.f40c-vis span { display: block; padding: 6px 12px; font-size: .875em; background: var(--c-surface); white-space: nowrap; }
.f40c-vis input:checked + span { background: var(--c-accent); color: var(--c-accent-ink); }
.f40c-vis input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.f40c-group { border: 1px solid var(--c-line); border-radius: 8px; padding: 6px 8px; background: var(--c-surface); max-width: 100%; }
.f40c-msg { margin: 0; font-size: .875em; color: var(--c-ok); }
.f40c-msg.is-bad { color: var(--c-no); }
.f40c-closed, .f40c-empty { margin: 0; color: var(--c-muted); }

/* danh sách */
.f40c-list, .f40c-extra, .f40c-kids { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.f40c-extra { padding: 12px; border: 1px dashed var(--c-line); border-radius: 12px; background: var(--c-soft); }
.f40c-c { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; scroll-margin-top: 90px; }
.f40c-c.is-target > .f40c-b { animation: f40c-flash 2.4s ease-out 1; }
@keyframes f40c-flash { from { background: color-mix(in srgb, var(--c-accent) 14%, transparent); } to { background: transparent; } }
.f40c-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; color: #fff; font-size: .8em; font-weight: 700; background: #64748b; }
.f40c-av img { width: 100%; height: 100%; object-fit: cover; }
.f40c-av--0 { background: #0e7490; } .f40c-av--1 { background: #6d28d9; } .f40c-av--2 { background: #b45309; } .f40c-av--3 { background: #15803d; }
.f40c-av--4 { background: #be185d; } .f40c-av--5 { background: #1d4ed8; } .f40c-av--6 { background: #0f766e; } .f40c-av--7 { background: #9333ea; }
.f40c-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; border-radius: 10px; }
.f40c-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .875em; }
.f40c-name { font-size: 1.06em; }
.f40c-time { color: var(--c-muted); text-decoration: none; }
.f40c-time:hover { text-decoration: underline; }
.f40c-tag { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: .78em; line-height: 1.7; background: var(--c-soft); color: var(--c-muted); white-space: nowrap; }
.f40c-tag--staff { background: color-mix(in srgb, var(--c-accent) 12%, var(--c-surface)); color: var(--c-accent); }
.f40c-tag--ok { background: color-mix(in srgb, var(--c-ok) 14%, var(--c-surface)); color: var(--c-ok); }
.f40c-tag--wait { background: color-mix(in srgb, var(--c-warn) 16%, var(--c-surface)); color: var(--c-warn); }
.f40c-tag--vis { border: 1px solid var(--c-line); }
.f40c-t { overflow-wrap: anywhere; }
.f40c-t > :first-child { margin-top: 0; }
.f40c-t > :last-child { margin-bottom: 0; }
.f40c-t p { margin: 0 0 .6em; }
.f40c-t blockquote { margin: .4em 0; padding: 2px 12px; border-left: 3px solid var(--c-line); color: var(--c-muted); }
.f40c-t code { padding: 1px 5px; border-radius: 5px; background: var(--c-soft); font-size: .9em; }
.f40c-t pre { margin: .4em 0; padding: 10px 12px; border-radius: 8px; background: var(--c-soft); overflow-x: auto; }
.f40c-t ul, .f40c-t ol { margin: .4em 0; padding-left: 1.3em; }
.f40c-c.is-pending > .f40c-b > .f40c-t { opacity: .7; }
.f40c-c.is-answer > .f40c-b { padding: 8px 10px; border: 2px solid var(--c-ok); background: color-mix(in srgb, var(--c-ok) 7%, var(--c-surface)); }
.f40c-a { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.f40c-rx { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 1px 10px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); font-size: .875em; cursor: pointer; }
.f40c-rx b { font-weight: 500; font-variant-numeric: tabular-nums; }
.f40c-rx[aria-pressed="true"] { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)); color: var(--c-accent); }
.f40c-rx[aria-pressed="true"] b { font-weight: 700; }
.f40c-rx:disabled { cursor: default; }
.f40c-note { font-size: .8em; color: var(--c-muted); }
.f40c-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c-accent) 8%, var(--c-surface)); font-size: .9em; }
.f40c-kids { margin-top: 12px; padding-left: var(--c-indent); border-left: 2px solid var(--c-line); }
.f40c-kids--flat > .f40c-c > .f40c-b > .f40c-kids { padding-left: 0; border-left: 0; }
.f40c-fold { display: flex; flex-direction: column; gap: 16px; }
.f40c-fold > summary { cursor: pointer; color: var(--c-accent); font-size: .875em; list-style: none; padding: 4px 0; }
.f40c-fold > summary::-webkit-details-marker { display: none; }
.f40c-fold[open] > summary { display: none; }
.f40c-more { align-self: center; padding: 8px 18px; border: 1px solid var(--c-line); border-radius: 999px; color: var(--c-ink); text-decoration: none; font-size: .9em; }
.f40c-more:hover { border-color: var(--c-accent); color: var(--c-accent); }
.f40c-more.is-busy { opacity: .5; pointer-events: none; }
.f40c-edit { display: flex; flex-direction: column; gap: 6px; }
.f40c-edit textarea { border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-surface); }
.f40c-edit__a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* bảng nổi: cảm xúc, thao tác */
.f40c-pop { position: absolute; z-index: 30; left: 0; bottom: calc(100% + 6px); display: flex; max-width: min(340px, calc(100vw - 40px)); max-height: 60vh; max-height: 60dvh; overflow: auto; padding: 6px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); box-shadow: 0 8px 28px rgb(0 0 0 / .16); }
.f40c-tb .f40c-pop { bottom: auto; top: calc(100% + 4px); }
.f40c-pop--emo { flex-wrap: wrap; gap: 2px; }
.f40c-pop--emo button { width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; font-size: 1.3em; line-height: 1; cursor: pointer; }
.f40c-pop--menu { flex-direction: column; min-width: 190px; }
.f40c-pop--menu button { display: block; width: 100%; min-width: 0; height: auto; border: 0; background: none; padding: 9px 12px; border-radius: 8px; text-align: left; font-size: .9em; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
/* Gợi ý @ người, # bước iSA: thả xuống dưới thanh công cụ, đủ rộng cho tên; dòng không co lại khi danh sách dài (cuộn). */
.f40c-pop--menu > * { flex-shrink: 0; }
.f40c-pop--people, .f40c-pop--steps { min-width: min(260px, calc(100vw - 40px)); max-height: min(320px, 50vh); }
.f40c-pop--steps button { white-space: normal; }
.f40c-pop button:hover, .f40c-pop button:focus-visible { background: var(--c-soft); }
.f40c-pop--menu .is-danger { color: var(--c-no); }

/* đầu khu: theo dõi; khóa học; nhắc tên; bước iSA; đánh giá */
.f40c-head__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.f40c-follow[aria-pressed="true"] { color: var(--c-accent); font-weight: 600; }
.f40c-scope { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c-accent) 8%, var(--c-surface)); font-size: .9em; }
.f40c-at { color: var(--c-accent); font-weight: 600; }
.f40c-isa { display: inline-block; padding: 0 9px; border: 1px solid color-mix(in srgb, var(--c-accent) 45%, var(--c-line)); border-radius: 999px; background: color-mix(in srgb, var(--c-accent) 8%, var(--c-surface)); color: var(--c-accent); font-size: .875em; text-decoration: none; line-height: 1.7; }
.f40c-isa:hover { background: color-mix(in srgb, var(--c-accent) 16%, var(--c-surface)); }
.f40c-isa.is-gone { color: var(--c-muted); border-color: var(--c-line); background: var(--c-soft); text-decoration: line-through; }
.f40c-pop__h { padding: 6px 12px 2px; font-size: .75em; letter-spacing: .04em; text-transform: uppercase; color: var(--c-muted); }
.f40c-pop .f40c-note { padding: 8px 12px; }
.f40c-given { color: var(--c-star); letter-spacing: 1px; white-space: nowrap; }
.f40c-given i { font-style: normal; color: var(--c-line); }
.f40c-give { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 0; border: 0; }
.f40c-give legend { float: left; padding: 0; margin-right: 12px; font-weight: 600; }
.f40c-give__stars { display: inline-flex; flex-direction: row-reverse; }
.f40c-give__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.f40c-give__stars label { padding: 2px 3px; font-size: 1.7em; line-height: 1; color: var(--c-line); cursor: pointer; }
.f40c-give__stars input:checked ~ label, .f40c-give__stars label:hover, .f40c-give__stars label:hover ~ label { color: var(--c-star); }
.f40c-give__stars input:focus-visible + label { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
.f40c-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 24px; align-items: center; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-soft); }
.f40c-sum__avg { display: flex; flex-direction: column; }
.f40c-sum__avg b { font-size: 2.2em; line-height: 1; font-variant-numeric: tabular-nums; }
.f40c-sum__avg span { font-size: .85em; color: var(--c-muted); }
.f40c-sum__bars { display: flex; flex-direction: column; gap: 3px; font-size: .8em; }
.f40c-sum__bars > div { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; gap: 8px; align-items: center; }
.f40c-bar { display: block; height: 8px; border-radius: 4px; background: linear-gradient( to right, var(--c-star) var(--f40c-w, 0%), var(--c-line) var(--f40c-w, 0%) ); }
.f40c-bar--10 { --f40c-w: 10%; } .f40c-bar--20 { --f40c-w: 20%; } .f40c-bar--30 { --f40c-w: 30%; } .f40c-bar--40 { --f40c-w: 40%; } .f40c-bar--50 { --f40c-w: 50%; }
.f40c-bar--60 { --f40c-w: 60%; } .f40c-bar--70 { --f40c-w: 70%; } .f40c-bar--80 { --f40c-w: 80%; } .f40c-bar--90 { --f40c-w: 90%; } .f40c-bar--100 { --f40c-w: 100%; }

/* khung kêu gọi: bao khung soạn hoặc hộp mời đăng nhập */
.f40c-cta { scroll-margin-top: 110px; position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1.5px solid color-mix(in srgb, var(--c-accent) 40%, var(--c-line)); border-radius: 18px; background: linear-gradient(90deg, var(--c-accent), var(--c-cyan)) top / 100% 4px no-repeat, linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 11%, var(--c-surface)) 0%, var(--c-surface) 55%, color-mix(in srgb, var(--c-cyan) 10%, var(--c-surface)) 100%); box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--c-accent) 70%, transparent); overflow: visible; }
.f40c-cta__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 14px; align-items: center; }
.f40c-cta__icon { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 55%, var(--c-cyan))); color: var(--c-accent-ink); }
.f40c-cta__icon svg { width: 24px; height: 24px; }
.f40c-cta--qa .f40c-cta__icon::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c-accent) 55%, transparent); animation: f40c-ring 2.4s ease-out infinite; }
@keyframes f40c-ring { 0% { transform: scale(.85); opacity: .9; } 70%, 100% { transform: scale(1.25); opacity: 0; } }
.f40c-cta__text h3 { margin: 0; font-size: 1.2em; line-height: 1.3; color: var(--c-ink); }
.f40c-cta__text p { margin: 4px 0 0; color: var(--c-muted); font-size: .92em; }
.f40c-cta__stat { display: flex; flex-direction: column; align-items: flex-end; margin: 0; padding: 6px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c-surface) 75%, transparent); border: 1px solid var(--c-line); text-align: right; }
.f40c-cta__stat b { font-size: 1.25em; line-height: 1.1; color: var(--c-accent); font-variant-numeric: tabular-nums; }
.f40c-cta__stat span { font-size: .75em; color: var(--c-muted); }
.f40c-cta .f40c-ed { background: var(--c-surface); box-shadow: 0 1px 0 color-mix(in srgb, var(--c-ink) 6%, transparent); }
.f40c-cta .f40c-login { border-style: solid; background: var(--c-surface); }
.f40c-cta .f40c-login .f40c-btn { min-height: 44px; padding-inline: 22px; }

/* khung nổi đăng nhập */
.f40c-dlg { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px; background: var(--c-surface); color: var(--c-ink); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .45); overflow: auto; }
.f40c-dlg::backdrop { background: rgb(10 14 22 / .55); backdrop-filter: blur(3px); }
.f40c-dlg[open] { animation: f40c-pop .18s ease-out; }
@keyframes f40c-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.f40c-dlg__box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 24px 22px; text-align: center; }
.f40c-dlg__box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--c-accent), var(--c-cyan)); }
.f40c-dlg__x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--c-muted); font-size: 26px; line-height: 1; cursor: pointer; }
.f40c-dlg__x:hover { background: var(--c-soft); color: var(--c-ink); }
.f40c-dlg__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--c-accent) 14%, var(--c-surface)); color: var(--c-accent); }
.f40c-dlg__icon svg { width: 28px; height: 28px; }
.f40c-dlg h2 { margin: 4px 0 0; font-size: 1.3em; line-height: 1.3; }
.f40c-dlg__lead { margin: 0; color: var(--c-muted); font-size: .94em; }
.f40c-dlg__alt { margin: 6px 0 0; font-size: .9em; }
.f40c-dlg__alt a { color: var(--c-accent); }
.f40c-dlg .fox40-social { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; margin: 8px 0 0; }
.f40c-dlg .fox40-social__google { display: flex; justify-content: center; width: 100%; min-height: 44px; }
.f40c-dlg .fox40-social__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 360px; min-height: 44px; padding: 0 20px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.f40c-dlg .fox40-social__btn--facebook { border: 0; background: #1877f2; color: #fff; }
.f40c-dlg .fox40-social__btn:disabled { opacity: .5; cursor: not-allowed; }
.f40c-dlg .fox40-social__status { margin: 0; color: var(--c-no); font-size: .9em; }
.f40c-dlg .fox40-social__about { margin: 4px 0 0; padding: 10px 14px; border: 1px dashed var(--c-line); border-radius: 12px; color: var(--c-muted); font-size: .85em; }
.f40c [data-f40c-needlogin] { cursor: pointer; }

/* điện thoại đứng */
@media (max-width: 600px) {
	.f40c { --c-indent: 10px; gap: 14px; }
	.f40c-c { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
	.f40c-av { width: 30px; height: 30px; font-size: .7em; }
	.f40c-kids .f40c-c { grid-template-columns: 26px minmax(0, 1fr); }
	.f40c-kids .f40c-av { width: 26px; height: 26px; }
	.f40c-ef .f40c-btn { flex: 1 1 100%; margin-left: 0; }
	.f40c-count { margin-left: auto; }
	.f40c-pop { max-width: calc(100vw - 32px); }
	.f40c-pop--menu { left: auto; right: 0; }
	.f40c-tb .f40c-pop--menu { left: 0; right: auto; }
	.f40c-cta { padding: 16px 14px; border-radius: 16px; }
	.f40c-cta__head { grid-template-columns: auto minmax(0, 1fr); }
	.f40c-cta__icon { width: 42px; height: 42px; }
	.f40c-cta__stat { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; text-align: left; }
	.f40c-cta .f40c-login { flex-direction: column; align-items: stretch; text-align: center; }
	.f40c-cta .f40c-login span { flex: none; }
	.f40c-dlg__box { padding: 26px 18px 18px; }
	.f40c-sum { grid-template-columns: minmax(0, 1fr); }
}
/* màn chạm: vùng bấm đủ lớn, chữ ô nhập 16px để iOS không tự phóng to */
@media (pointer: coarse) {
	.f40c-rx { min-height: 38px; padding-inline: 12px; }
	.f40c-link { min-height: 38px; padding-inline: 10px; }
	.f40c-tb > button { width: 42px; height: 40px; }
	.f40c-stars button { padding: 6px 5px; }
	.f40c-ed textarea, .f40c-edit textarea, .f40c-guest input, .f40c-sort select, .f40c-group { font-size: max(16px, 1em); }
	.f40c-vis span { padding: 9px 12px; }
	.f40c-give__stars label { padding: 6px 5px; }
	.f40c-isa { line-height: 2; }
}
/* điện thoại ngang: màn thấp, tránh vùng tai thỏ hai bên */
@media (orientation: landscape) and (max-height: 500px) {
	.f40c { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
	.f40c-ed textarea, .f40c-edit textarea { min-height: 56px; max-height: 38dvh; }
	.f40c-pop { max-height: 70dvh; }
	.f40c-c { scroll-margin-top: 56px; }
	.f40c-dlg { max-height: calc(100dvh - 16px); }
	.f40c-dlg__box { gap: 6px; padding: 18px 20px 14px; }
	.f40c-dlg__icon { display: none; }
	.f40c-cta { padding: 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.f40c-c.is-target > .f40c-b { animation: none; }
	.f40c-cta--qa .f40c-cta__icon::after, .f40c-dlg[open] { animation: none; }
}
