/* Chợ Drone – giao diện (dựa trên thiết kế "Chợ Drone — Kết nối mùa vụ").
   Màu chữ phụ đã chỉnh để đạt độ tương phản tối thiểu 4,5:1. */
:root {
  --g: #174f3b;          /* xanh chủ đạo */
  --g-dark: #103a2b;
  --g-soft: #e7efdf;
  --lime: #d3ee85;
  --gold: #efba45;
  --gold-soft: #fdf6e3;
  --bg: #f5f6f2;
  --ink: #203b30;
  --muted: #5a6a60;      /* chữ phụ, đạt 5,3:1 trên nền */
  --eyebrow: #4f6b45;
  --line: #e0e5dc;
  --line-soft: #edf0eb;
  --input: #c9d2c6;
  --art: linear-gradient(145deg, #e9ede4, #d5dfcc);
  --red: #9a2e1c;
  --brown: #7a5200;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font: 15px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--g); }
a:hover { color: var(--g-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h2 { font-size: 25px; letter-spacing: -0.6px; }
p { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 30px; }
.page { padding-top: 26px; padding-bottom: 60px; }
.block { margin-top: 44px; }
.mt { margin-top: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.xsmall { font-size: 12px; }
.strong { font-weight: 700; }
.green { color: var(--g); }
.pre { white-space: pre-line; line-height: 1.7; }
.h3 { font-size: 20px; margin-bottom: 14px; }
.h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.span-2 { grid-column: span 2; }
.span-full { grid-column: 1 / -1; }
.page-title { font-size: clamp(28px, 4vw, 36px); letter-spacing: -1px; margin: 10px 0; }

/* Nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 9px; border: 1px solid transparent; font-weight: 650; font-size: 15px; text-decoration: none; cursor: pointer; background: var(--g); color: #fff; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); color: #fff; }
.btn-primary { background: var(--g); color: #fff; }
.btn-gold { background: var(--gold); color: #253a2b; }
.btn-gold:hover { color: #253a2b; }
.btn-ghost { background: #fff; color: var(--g); border-color: #d3dbd1; }
.btn-ghost:hover { color: var(--g); background: var(--g-soft); filter: none; }
.btn-outline-light { background: transparent; color: #fff; border-color: #ffffff80; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 46px; padding: 0; flex: 0 0 auto; }

/* Nhãn */
.tag { display: inline-block; background: #eaf1e4; color: #47703b; border-radius: 5px; padding: 5px 9px; font-size: 12px; font-weight: 600; }
.badge { position: absolute; top: 14px; left: 14px; background: #fff; color: var(--ink); padding: 6px 10px; font-size: 11px; border-radius: 5px; font-weight: 700; }
.badge-right { left: auto; right: 14px; }
.badge-green, .badge-inline.badge-green { background: var(--g); color: #fff; }
.badge-inline { display: inline-block; padding: 5px 9px; font-size: 12px; border-radius: 5px; font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { align-self: flex-start; display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.chip-in { background: #e5f1e8; color: var(--g); }
.chip-low { background: #fdf1d6; color: var(--brown); }
.chip-high { background: #fbe4df; color: var(--red); }
.cmp-in { color: var(--g); }
.cmp-low { color: var(--brown); }
.cmp-high { color: var(--red); }
.eyebrow { display: block; letter-spacing: 1.3px; font-size: 11px; font-weight: 700; color: var(--eyebrow); margin-bottom: 10px; }
.eyebrow-lime { color: var(--lime); }
.eyebrow-gold { color: #e4c568; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #e0e6df; position: sticky; top: 0; z-index: 20; }
.header-row { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { font-size: 24px; font-weight: 850; letter-spacing: -1px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.brand-accent { color: #3f7a49; }
.site-header nav { display: flex; gap: 24px; flex: 1; }
.site-header nav a { font-weight: 600; color: var(--muted); text-decoration: none; padding: 12px 0; }
.site-header nav a.active, .site-header nav a:hover { color: var(--g); }
.header-user { display: flex; align-items: center; gap: 16px; }
.header-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 12px 0; white-space: nowrap; }
.header-link.active, .header-link:hover { color: var(--g); }

/* Hero */
.hero { background: var(--g); color: #fff; border-radius: 22px; margin-top: 28px; padding: 40px; }
.herotop { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr); gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(33px, 5vw, 48px); line-height: 1.14; letter-spacing: -1.6px; margin: 6px 0 16px; }
.lead { color: #c9dcd1; max-width: 560px; line-height: 1.7; }
.heroactions { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0; }
.quickfind { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-size: 13px; color: #d3e3d5; }
.quickfind a { color: #fff; text-decoration: none; padding: 8px 12px; border: 1px solid #ffffff55; border-radius: 9px; font-weight: 600; }
.quickfind a:hover { background: #ffffff18; color: #fff; }
.pricefinder { background: #fff; color: var(--ink); border-radius: 16px; padding: 24px; box-shadow: 0 15px 30px #082a2730; display: flex; flex-direction: column; gap: 14px; }
.pricefinder h2 { font-size: 20px; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.priceresult { background: #f2f5e9; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 6px; min-height: 108px; }
.priceresult .range { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.priceresult .range span { font-size: 16px; font-weight: 600; }
.search { display: flex; gap: 10px; background: #fff; border-radius: 13px; padding: 12px; margin-top: 30px; color: var(--ink); }
.search > div { flex: 1 1 0; min-width: 0; }
.search .search-q { flex: 2 1 0; }
.search input, .search select { width: 100%; }

/* Ô nhập chung */
input, select, textarea { border: 1px solid var(--input); padding: 0 12px; min-height: 46px; border-radius: 8px; background: #fff; color: var(--ink); min-width: 0; width: 100%; }
textarea { padding: 12px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--g); flex: 0 0 auto; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 650; }
.field-check { justify-content: flex-end; }
[aria-invalid="true"] { border: 2px solid var(--red); }
.field-error { color: var(--red); font-size: 13px; font-weight: 600; }
.field-error:empty { display: none; }
.hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.inline-opts { display: flex; flex-wrap: wrap; gap: 0 22px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 9px; border: 1px solid #d3dbd1; background: #f4f7ed; font-weight: 650; cursor: pointer; color: var(--g); }
.pill input:checked + span { background: var(--g); border-color: var(--g); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.kindcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kindcard input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kindcard span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 11px; border: 1.5px solid #d3dbd1; background: #f4f7ed; cursor: pointer; color: var(--g); }
.kindcard small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.kindcard input:checked + span { background: var(--g); border-color: var(--g); color: #fff; }
.kindcard input:checked + span small { color: #cfe0d5; }
.kindcard input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Nguyên tắc */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; padding: 28px 0; border-bottom: 1px solid #dce4d5; }
.principles .pnum { display: block; color: var(--eyebrow); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.principles .small { margin-top: 4px; line-height: 1.6; }

/* Danh sách tin */
.sectionhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; min-height: 44px; background: #fff; color: var(--muted); border: 1px solid var(--line); padding: 0 16px; border-radius: 9px; text-decoration: none; font-weight: 650; }
.chip-btn.on { background: var(--g); color: #fff; border-color: var(--g); }
.flycam-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #eaf1e4; border: 1px solid #cfdcc5; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.flycam-note p { flex: 1 1 320px; }
.listingtools { display: flex; justify-content: flex-end; gap: 6px 14px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.sort { font-size: 14px; color: var(--muted); padding: 8px 2px; }
.sort.on { color: var(--g); font-weight: 700; text-decoration: none; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.card:has(.card-link):hover { transform: translateY(-4px); box-shadow: 0 10px 25px #173b3018; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ''; position: absolute; inset: 0; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.card.is-sold { opacity: 0.7; }
.art { height: 195px; background: var(--art); display: grid; place-items: center; position: relative; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art-blue { background: #e3edf2; }
.drone-art { width: 240px; filter: drop-shadow(0 15px 8px #233c3729); }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 17px; line-height: 1.35; }
.meta { color: var(--muted); font-size: 13px; }
.price { color: var(--g); font-size: 23px; font-weight: 780; margin-top: 6px; }
.seller { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.score-mini { font-weight: 700; color: var(--g); white-space: nowrap; }
.empty { text-align: center; padding: 45px 20px; background: #fff; border: 1px dashed var(--input); border-radius: 15px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* Bảng */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid #e9eee5; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.num { text-align: right !important; white-space: nowrap; }

/* Các bước */
.howgrid { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.howgrid li { border: 1px solid #dce3d6; border-radius: 13px; padding: 22px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.howgrid h3 { font-size: 16px; }
.step-num { display: grid; place-items: center; border-radius: 50%; width: 32px; height: 32px; background: #f5d88c; font-weight: 750; }
.sellcta { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 17px; background: #203e30; color: #fff; padding: 32px; margin-top: 44px; flex-wrap: wrap; }
.sellcta > div { flex: 1 1 420px; }
.sellcta p { color: #bdd0c1; margin-top: 8px; }
.banner { display: flex; align-items: center; gap: 25px; background: #e6edda; border-radius: 16px; padding: 28px; margin-top: 30px; flex-wrap: wrap; }
.banner > div { flex: 1 1 420px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.banner p { color: var(--muted); }
.plan ul { padding-left: 18px; line-height: 2; margin: 6px 0 14px; }
.plan { padding: 26px; gap: 6px; }

.site-footer { margin-top: 50px; border-top: 1px solid #dce3d9; padding: 30px 0; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.footer-row > div { max-width: 520px; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; }
.brand-sm { font-weight: 800; color: var(--ink); }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-row a { color: var(--muted); }

/* Trang tin */
.notice { border-radius: 12px; padding: 14px 18px; margin-bottom: 16px; }
.notice-warn { background: var(--gold-soft); border: 1px solid #f0dda8; color: #5c3e00; }
.notice-err { background: #fbe4df; border: 1px solid #edb7ab; color: var(--red); }
.notice-dark { background: #203e30; color: #fff; }
.notice-info { background: #eaf1e4; border: 1px solid #cfdcc5; color: var(--ink); }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb a { color: var(--muted); }
.two-col { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 96px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 24px; }
.panel-strong { border: 2px solid var(--g); }
.gallery { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.gallery-main { height: clamp(240px, 42vw, 430px); border-radius: 12px; overflow: hidden; background: #111; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main .art-big { height: 100%; }
.gallery-main:has(.art-big) { background: none; }
.art-big .drone-art { width: min(360px, 70%); }
.art-note { position: absolute; bottom: 14px; font-size: 13px; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.thumb { height: 72px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; padding: 0; background: #e9ede4; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border: 2px solid var(--g); }
.thumb-video { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; text-align: center; padding: 0 8px; }
.specs { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 24px; }
.spec { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 650; text-align: right; }
.spec dd.nodata { color: var(--muted); font-weight: 400; font-style: italic; }
.score-panel { display: flex; flex-wrap: wrap; gap: 24px; }
.score-left { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.score-right { flex: 1 1 300px; min-width: 0; }
.score-right > .muted { margin: -6px 0 14px; }
.ring { flex: 0 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ring-inner { border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 30px; font-weight: 800; line-height: 1; }
.ring-max { font-size: 12px; color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 9px 18px; font-size: 14px; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist .ok { color: var(--g); display: flex; }
.checklist .no { color: #8a968d; display: flex; }
.checklist .pts { margin-left: auto; font-weight: 700; font-size: 12px; color: var(--brown); white-space: nowrap; }
.checklist .pts.done { color: var(--g); }
.inspect-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.inspect-list li { background: var(--bg); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.listing-title { font-size: 24px; line-height: 1.25; letter-spacing: -0.5px; }
.price-big { font-size: 32px; font-weight: 800; color: var(--g); letter-spacing: -1px; }
.soft-box { background: #f2f5e9; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.pricebar { position: relative; height: 10px; border-radius: 999px; background: #dfe5d8; margin: 8px 0; }
.pricebar-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--g); }
.pricebar-marker { position: absolute; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 3px solid #fff; box-shadow: 0 1px 3px #0004; }
.pricebar-labels { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.safety { display: flex; gap: 12px; background: var(--gold-soft); border: 1px solid #f0dda8; border-radius: 15px; padding: 18px; color: #3d2a00; font-size: 14px; line-height: 1.6; }
.safety-icon { color: var(--brown); flex: 0 0 auto; padding-top: 2px; }
.seller-card { display: flex; gap: 14px; align-items: center; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--g-soft); color: var(--g); font-weight: 800; font-size: 20px; display: grid; place-items: center; }
.mobile-bar { display: none; }

/* Khung quản lý tin */
.owner { background: #fff; border: 2px solid var(--gold); border-radius: 15px; padding: 22px; margin-bottom: 22px; }
.owner-ok { background: #e5f1e8; color: var(--g); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }
.owner-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { font-size: 13px; background: var(--bg); }
.owner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.owner-admin { border-color: var(--g); }
.reject-form { display: flex; gap: 8px; flex-wrap: wrap; }
.reject-form input { flex: 1 1 200px; width: auto; }
.red { color: var(--red); }

/* Trạng thái tin */
.status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pending { background: #fdf1d6; color: var(--brown); }
.status-active { background: #e5f1e8; color: var(--g); }
.status-sold { background: #e4e8e3; color: var(--ink); }
.status-hidden { background: #eceeea; color: var(--muted); }
.status-rejected { background: #fbe4df; color: var(--red); }

/* Đăng nhập / đăng ký */
.authbox { max-width: 440px; margin: 10px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.authbox .h3 { margin-bottom: 0; }
.authbox .notice, .authbox .owner-ok { margin-bottom: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12px; }
.otp-input { font-size: 24px; letter-spacing: 8px; text-align: center; font-weight: 700; }

/* Quản trị */
.admin-nav { margin-top: 6px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--gold); color: #253a2b; font-size: 12px; }
.admin-table td { vertical-align: top; }
.admin-table table { min-width: 760px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; max-width: 340px; }
.row-actions .reject-form input { min-height: 36px; font-size: 13px; flex-basis: 140px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.shop-row { display: grid; grid-template-columns: 1.4fr 0.8fr 0.9fr 1.6fr auto; gap: 10px; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.shop-row:last-child { border-bottom: 0; padding-bottom: 0; }

/* Form đăng tin */
.postheading { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.postheading h1 { font-size: clamp(28px, 4vw, 34px); letter-spacing: -1px; }
.slogan { color: var(--g); font-weight: 750; }
.poststeps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.poststeps a { background: #fff; border: 1px solid #d3dbd1; border-radius: 9px; padding: 12px 14px; font-size: 14px; font-weight: 650; color: var(--g); text-decoration: none; }
.postlayout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.postsection { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 24px; margin-bottom: 20px; }
.postsection > h2 { font-size: 21px; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.postsection > h2 > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; background: var(--g-soft); color: #396b3d; border-radius: 50%; font-size: 15px; }
.sec-legend { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.postaside { position: sticky; top: 96px; }
.postaside .postsection { padding: 20px; }
.score-live { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.postaside .checklist { grid-template-columns: 1fr; font-size: 13px; }
.card-static .art { height: 140px; }
.card-static .drone-art { width: 160px; }
.batteryrow { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.photo-slot { min-height: 150px; border-radius: 12px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; background: #f5f8ef; border: 1.5px dashed #92a88a; }
.photo-slot:hover { border-color: var(--g); }
.photo-slot:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.photo-slot.has-file { background: #e5f1e8; border-style: solid; border-color: var(--g); }
.photo-preview { width: 100%; height: 80px; display: grid; place-items: center; color: var(--muted); }
.photo-preview { position: relative; }
.photo-preview img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; }
.photo-count { position: absolute; right: 6px; bottom: 6px; background: var(--g); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.postactions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.postactions p { flex: 1 1 100%; }

/* Máy tính bảng & điện thoại */
@media (max-width: 900px) {
  .col-side, .postaside { position: static; }
  .postlayout { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; box-shadow: 0 -6px 16px #0000001a; }
  .mobile-bar > div { flex: 1; min-width: 0; }
  body:has(.mobile-bar) { padding-bottom: 78px; }
  .owner-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .wrap { padding: 0 16px; }
  .header-row { min-height: 0; padding-top: 12px; padding-bottom: 6px; flex-wrap: wrap; gap: 4px 12px; }
  .brand { flex: 1; font-size: 22px; }
  .site-header nav { order: 3; flex-basis: 100%; gap: 20px; font-size: 14px; }
  .header-user { gap: 12px; }
  .shop-row { grid-template-columns: 1fr 1fr; }
  .shop-row .shop-desc { grid-column: 1 / -1; }
  .authbox { padding: 20px; }
  .hero { padding: 24px 20px; border-radius: 18px; margin-top: 18px; }
  .herotop { grid-template-columns: 1fr; gap: 24px; }
  .search { flex-wrap: wrap; }
  .search > div, .search .search-q { flex: 1 1 100%; }
  .search .btn { flex: 1 1 100%; }
  .principles, .howgrid { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .art { height: 150px; }
  .drone-art { width: 170px; }
  .card .body { padding: 14px; }
  .price { font-size: 20px; }
  .sectionhead { align-items: flex-start; flex-direction: column; }
  .listingtools { justify-content: flex-start; }
  .poststeps, .kindcards { grid-template-columns: 1fr 1fr; }
  .postsection, .panel { padding: 18px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .art { height: 190px; }
  .drone-art { width: 230px; }
  .howgrid { grid-template-columns: 1fr; }
  .copyrow { flex-direction: column; }
  .site-header .btn-gold { min-height: 42px; padding: 0 14px; }
}
