/* Kiểu riêng của từng nhóm màn hình. */

/* Trang giới thiệu */
.landing { position: relative; flex: 1; min-height: 760px; padding: 0 var(--g) 28px; display: flex; flex-direction: column; isolation: isolate; overflow: hidden; }
.landing .photo { position: absolute; left: 0; bottom: 0; height: 154%; width: auto; min-width: 100%; max-width: none; object-fit: cover; object-position: left bottom; z-index: -4; }
.landing::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 170px; z-index: -3; background: linear-gradient(180deg, rgba(6, 38, 58, .5), rgba(6, 38, 58, 0)); }
.landing-copy { margin-block: auto; max-width: 520px; padding-block: 24px; }
.landing-copy h1 { font-size: clamp(42px, 5.2vw, 76px); margin-top: 8px; }
.landing-copy p { font-size: 18px; line-height: 28px; margin-top: 14px; }
.landing-tray { padding: 14px; border-radius: 20px; background: var(--glass-tray); border: 1px solid rgba(255, 255, 255, .7); backdrop-filter: blur(18px) saturate(1.2); }
.landing-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.landing-steps li { background: #fff; border-radius: 14px; padding: 14px 16px; font-size: 14px; line-height: 21px; color: var(--deep-soft); }
.landing-steps b { display: flex; gap: 8px; align-items: center; color: var(--deep); font-size: 16px; line-height: 24px; margin-bottom: 2px; }
@media (max-width: 1000px) { .landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .landing-steps { grid-template-columns: minmax(0, 1fr); } }

/* Thẻ chuyến đi */
.trip-card { display: flex; flex-direction: column; padding: 10px 10px 14px; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-card); text-decoration: none; transition: transform .18s; }
.trip-card:hover { transform: translateY(-3px); }
.trip-card .thumb { position: relative; height: 170px; border-radius: var(--r-in); overflow: hidden; }
.trip-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trip-card .thumb .tag { position: absolute; right: 8px; top: 8px; }
.trip-card .body { padding: 12px 6px 0; display: grid; gap: 4px; }

/* Bảng việc cần làm */
.todo { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-in); border: 1px solid var(--line); background: #fff; text-decoration: none; }
a.todo:hover { border-color: var(--deep); }
.todo > i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--sand-soft); flex: none; }
.todo.done > i { background: var(--ok-bg); color: var(--ok); }

/* Sợi dệt phiếu */
.lakebox { position: relative; padding: 18px clamp(14px, 2vw, 24px) 18px; border-radius: 24px; overflow: hidden; isolation: isolate; }
.lakebox > .photo { position: absolute; left: 0; bottom: 0; width: 100%; height: 150%; object-fit: cover; object-position: 30% 100%; z-index: -3; max-width: none; }
.lakebox::before { content: ""; position: absolute; inset: 0 62% 0 0; z-index: -2; background: linear-gradient(120deg, #F3C793, var(--sand-2)); clip-path: url(#clip-box); }
.scroller { overflow-x: auto; margin-inline: -8px; padding-inline: 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .55) transparent; }
.stage { position: relative; display: flex; width: max-content; min-width: 100%; padding-block: 6px; --lead: 112px; --tail: 100px; --thumb: 180px; }
.lead { position: sticky; left: 0; flex: 0 0 var(--lead); z-index: 5; border-radius: 14px; }
.stage.scrolled .lead { background: rgba(239, 188, 135, .9); backdrop-filter: blur(10px); }
.w-chip { position: absolute; left: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.panels { flex: 1 0 auto; display: flex; gap: 14px; }
.tail { position: relative; flex: 0 0 var(--tail); }
.knot-label { position: absolute; left: 22px; transform: translateY(26px); width: max-content; padding: 5px 9px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .8); font-size: 13px; line-height: 18px; }
.knot-label b { display: block; font-size: 14px; line-height: 19px; font-weight: 700; }
svg.layer { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
svg.under { z-index: 1; }
svg.over { z-index: 3; }
.panel { position: relative; z-index: 2; flex: 1 1 0; min-width: 232px; max-width: 320px; container-type: inline-size; display: flex; flex-direction: column; padding: 10px 10px 12px; border-radius: var(--r-card); background: var(--glass); border: 1px solid rgba(255, 255, 255, .85); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 18px 32px -24px rgba(6, 40, 54, .75); transition: transform .18s; }
.panel:hover { transform: translateY(-3px); }
.panel .thumb { position: relative; height: var(--thumb); border-radius: var(--r-in); overflow: hidden; background: #D8E4E2; flex: none; pointer-events: none; }
.panel .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .25s, opacity .25s; }
.panel.dim .thumb img { filter: saturate(.15); opacity: .5; }
.panel.dim .thumb .woven { opacity: .4; }
.panel .thumb .woven { position: absolute; inset: 0; display: grid; place-items: center; color: var(--deep-soft); }
.panel .tag { position: absolute; right: 8px; top: 8px; pointer-events: none; background: rgba(255, 255, 255, .92); color: var(--ok); }
.panel .tag.warn { background: var(--warn-bg); color: var(--warn); }
.panel .open { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; border-radius: var(--r-card); }
.panel .open:focus-visible { outline-offset: -3px; }
.panel .cap { flex: 1; display: flex; flex-direction: column; padding: 10px 4px 0; pointer-events: none; }
.panel .cap h3 { font-size: 17px; line-height: 23px; }
.panel .cap p { font-size: 13.5px; line-height: 20px; color: var(--deep-soft); }
.panel .tally { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 9px; }
.panel .vote { pointer-events: auto; }
.count-pp { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; }
.count-pp .icon { width: 16px; height: 16px; color: var(--deep-soft); }
.count-pp b { font-weight: 700; }
.count-pp .w { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@container (min-width: 244px) { .count-pp .w { position: static; width: auto; height: auto; overflow: visible; clip-path: none; } }
.hit { pointer-events: all; cursor: pointer; fill: transparent; }
.ov.pop-in { animation: rise .34s cubic-bezier(.2, .9, .3, 1.3); transform-box: fill-box; transform-origin: center; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tray { margin-top: 14px; padding: 10px 14px 14px; border-radius: 20px; background: var(--glass-tray); border: 1px solid rgba(255, 255, 255, .7); backdrop-filter: blur(18px) saturate(1.2); }
.tray-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px 28px; flex-wrap: wrap; padding: 0 4px 10px; font-size: 13.5px; line-height: 20px; }
.legend { display: flex; gap: 4px 26px; flex-wrap: wrap; }
.legend li { display: flex; align-items: center; gap: 9px; }
.sw { position: relative; flex: none; width: 36px; height: 20px; }
.sw::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 2px; background: var(--deep); }
.sw i { position: absolute; left: 11px; width: 14px; top: 0; bottom: 0; background: #fff; border: 1px solid var(--deep-soft); border-radius: 3px; }
.sw b { position: absolute; left: 7px; right: 7px; top: 7px; height: 6px; border-radius: 3px; background: var(--deep); box-shadow: 0 0 0 1.5px #fff; }
.compose { display: flex; gap: 14px; }
.compose .segbar { flex: 1; min-width: 0; }
.compose .seg.info { flex: 0 0 298px; cursor: default; }
.compose .seg.info .icon, .compose .seg.info b { color: var(--warn); }
.compose .seg.info b { display: block; font-size: 14px; line-height: 21px; font-weight: 600; }
.send { flex: none; min-height: 70px; padding: 0 30px; border-radius: 14px; font-size: 16px; }
@media (max-width: 1120px) {
  .compose .segbar { flex-wrap: wrap; }
  .compose .seg.info { flex: 1 0 100%; min-height: 54px; border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
  .compose .seg:nth-child(2) { border-radius: 0 14px 0 0; }
  .compose .seg:first-child { border-radius: 14px 0 0 0; }
}
@media (max-width: 720px) {
  .stage { --lead: 50px; --thumb: 170px; }
  .w-chip .nm { display: none; }
  .panel { flex: 0 0 232px; }
  .compose { flex-direction: column; gap: 10px; }
  .compose .seg, .compose .seg.info { flex: none; border-left: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .compose .seg:nth-child(2) { border-radius: 0; }
  .compose .seg:first-child { border-top: 0; border-radius: 14px 14px 0 0; }
  .compose .seg:last-child { border-radius: 0 0 14px 14px; }
  .send { width: 100%; min-height: 56px; }
}

/* Kết quả tìm kiếm */
.result { display: flex; gap: 14px; padding: 10px; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-card); }
.result .pic { position: relative; width: 148px; height: 118px; border-radius: var(--r-in); overflow: hidden; flex: none; }
.result .pic img { width: 100%; height: 100%; object-fit: cover; }
.result .pic .woven { position: absolute; inset: 0; display: grid; place-items: center; color: var(--deep-soft); }
.result .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-block: 2px; }
@media (max-width: 520px) { .result { flex-direction: column; } .result .pic { width: 100%; } }

/* Thanh ngân sách */
.budget-row { display: grid; gap: 5px; }
.budget-row .row { font-size: 14px; line-height: 20px; }

/* Bảng dựng lịch */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(268px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.day-col { background: var(--paper-2); border-radius: var(--r-card); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; transition: background-color .15s; }
.day-col.over { background: var(--sand-soft); box-shadow: inset 0 0 0 2px var(--sand-2); }
.day-col > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.act { background: #fff; border-radius: 13px; padding: 11px 12px; box-shadow: 0 10px 18px -16px rgba(6, 40, 54, .7); display: grid; gap: 6px; border-left: 4px solid var(--line-strong); cursor: grab; }
.act.must { border-left-color: var(--deep); }
.act.bad { border-left-color: var(--err); }
.act.dragging { opacity: .45; }
.act .ttl { font-weight: 700; font-size: 15px; line-height: 21px; }
.act .tools { display: flex; gap: 2px; flex-wrap: wrap; margin-left: -6px; }
.act .tools .icon-btn { width: 40px; height: 40px; }
.time-fields { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; }
.time-fields .input { min-height: 44px; padding: 8px 8px; font-size: 14px; }
.time-fields .input-affix .input { padding-right: 38px; }
.time-fields .input-affix .affix { right: 8px; top: 11px; font-size: 13px; }
.drop-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: 13px; color: var(--deep-soft); font-size: 14px; line-height: 21px; }

/* Danh sách kiểm tra */
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; }
.check:last-child { border-bottom: 0; }
.check .icon { margin-top: 1px; }
.check.ok .icon { color: var(--ok); }
.check.warn .icon { color: var(--warn); }
.check.block .icon { color: var(--err); }

/* So sánh phương án */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 14px; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 20px; border: 2px solid transparent; }
.plan.sel { border-color: var(--deep); }
.plan .big { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.02em; }
.plan .foot-act { margin-top: auto; display: grid; gap: 10px; }

/* Dòng thời gian lịch */
.day-block { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; }
.day-block .day-h { position: sticky; top: 12px; align-self: start; }
.day-block .day-h b { display: block; font-size: 22px; line-height: 28px; letter-spacing: -.01em; }
.tl { position: relative; display: grid; gap: 12px; padding-left: 28px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--sand-2) 0 12px, var(--deep) 12px 18px, var(--m-m) 18px 30px, var(--deep) 30px 36px); }
.tl-item { position: relative; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 14px 16px; display: grid; gap: 8px; }
.tl-item::before { content: ""; position: absolute; left: -25px; top: 19px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--deep); }
.tl-item.done::before { background: var(--ok); border-color: var(--ok); }
.tl-item.skip::before { background: #B9C7C4; border-color: #B9C7C4; }
.seg-status { display: inline-flex; padding: 3px; border-radius: 11px; background: #EDF1EF; gap: 2px; flex-wrap: wrap; }
.seg-status button { min-height: 40px; padding: 0 11px; border: 0; border-radius: 9px; background: none; font-size: 13.5px; font-weight: 500; }
.seg-status button[aria-pressed=true] { background: var(--deep); color: #fff; font-weight: 700; }
.seg-status button[disabled] { color: #677E83; cursor: not-allowed; }
.travel { font-size: 13.5px; line-height: 20px; color: var(--deep-soft); display: flex; gap: 6px; align-items: center; padding-left: 4px; }
@media (max-width: 760px) { .day-block { grid-template-columns: minmax(0, 1fr); gap: 10px; } .day-block .day-h { position: static; } }

/* So sánh trước và sau */
.diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.diff > div { padding: 10px 12px; border-radius: 10px; background: var(--paper-2); font-size: 14.5px; line-height: 21px; }
.diff .new { background: var(--sand-soft); }

/* Tổng kết kiểu thẻ */
.wrap-deck { display: grid; grid-auto-flow: column; grid-auto-columns: min(340px, 82vw); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 12px; scrollbar-width: thin; }
.wrap-card { position: relative; scroll-snap-align: start; height: 450px; padding: 24px; border-radius: 26px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: var(--deep); background: linear-gradient(150deg, #F3C793, var(--sand-2)); isolation: isolate; }
.wrap-card.lake { color: #fff; background: #0E3F52; }
.wrap-card.lake::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 38, 58, .35), rgba(6, 38, 58, .82)), url(../img/lake-hero.jpg) 60% 80% / cover; }
.wrap-card.paper { background: #fff; }
.wrap-card.deep { background: var(--deep); color: #fff; }
.wrap-card .huge { font-size: 76px; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.wrap-card h3 { font-size: 26px; line-height: 33px; letter-spacing: -.02em; }
.threads { position: absolute; inset: auto 0 0 0; height: 90px; z-index: -1; }

.stars { display: inline-flex; gap: 4px; }
.stars button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 9px; }
.stars .icon { width: 26px; height: 26px; }
.stars button[aria-pressed=true] .icon { fill: var(--sand-2); color: var(--sand-2); }
