/* KCN Châu Đức 360° — "Bản đồ quy hoạch × lô đất × điểm bay flycam"
   Màu lấy từ chú giải bản đồ quy hoạch sử dụng đất: tím = đất nhà máy, xanh lá = đất trống / cây xanh,
   vàng an toàn công trường cho nút hành động. Font: Smooch Sans (biển hiệu), Wix Madefor Text (chữ), Inconsolata (số đo). */
:root {
  --ink: #14161b; --ink2: #1d2027; --ink3: #2a2e37; --line: rgba(255,255,255,.12);
  --paper: #f3f0e6; --paper2: #e6e1d2; --text: #eef0f4; --mute: #a3a9b6;
  --violet: #6b3cf0; --violet2: #4b22c4; --lime: #3ee05a; --lime2: #b6ff9c; --hazard: #ffc21a; --red: #e8452c;
  --disp: 'Smooch Sans', 'Arial Narrow', sans-serif; --body: 'Wix Madefor Text', system-ui, sans-serif; --mono: 'Inconsolata', ui-monospace, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--text); font: 15px/1.45 var(--body); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
.i { width: 20px; height: 20px; flex: none; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
[hidden] { display: none !important; }
#pano { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- lớp đa giác + điểm nóng ---------- */
.poly { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.poly polygon { vector-effect: non-scaling-stroke; transition: fill-opacity .2s; }
.poly .p-trong { fill: url(#hatch); stroke: var(--lime2); stroke-width: 2; stroke-dasharray: 7 4; pointer-events: visiblePainted; cursor: pointer; }
.poly .p-trong:hover, .poly .p-trong.on { fill: url(#hatch-on); stroke: var(--hazard); }
.poly .p-nm { fill: rgba(107,60,240,.26); stroke: rgba(170,140,255,.85); stroke-width: 1.5; }
.poly .p-kdc { fill: rgba(255,194,26,.22); stroke: var(--hazard); stroke-width: 1.6; }
.hs-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.hs { position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform; }
.hide-hs .hs-go, .hide-nm .tg, .hide-nm .lb-nm, .hide-nm .p-nm, .hide-nm .p-kdc, .hide-nm .lb-kdc,
.hide-trong .lb-trong, .hide-trong .p-trong, .hide-dist .ds { display: none !important; }

/* điểm bay: lục giác tím + drone */
.hs-go { display: flex; flex-direction: column; align-items: center; margin: -21px 0 0 -21px; width: 42px; }
.hs-go .mk { width: 42px; height: 46px; display: grid; place-items: center; color: #fff;
  background: var(--violet); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 0 0 2px #fff inset; transition: transform .2s, background .2s; position: relative; }
.hs-go .mk::after { content: ''; position: absolute; inset: 3px; clip-path: inherit; border: 0; background: transparent; box-shadow: 0 0 0 2px rgba(255,255,255,.9) inset; }
.hs-go .mk .i { width: 24px; height: 24px; position: relative; z-index: 1; }
.hs-go .lb { margin-top: 5px; white-space: nowrap; background: rgba(20,22,27,.88); border-left: 3px solid var(--hazard);
  padding: 3px 8px 3px 7px; font: 700 15px/1.1 var(--disp); letter-spacing: .04em; text-transform: uppercase; }
.hs-go .lb small { display: block; font: 500 11px/1.2 var(--mono); color: var(--hazard); letter-spacing: .03em; text-transform: none; }
.hs-go:hover .mk { transform: scale(1.1); background: var(--violet2); }
.hs-go::before { content: ''; position: absolute; top: 46px; left: 50%; width: 2px; height: 0; background: var(--hazard); }

/* nhãn nhà máy */
.tg { display: flex; align-items: center; gap: 4px; transform-origin: 0 50%; margin: -11px 0 0 -6px; white-space: nowrap;
  background: rgba(255,255,255,.93); color: #23154f; border-radius: 3px; padding: 2px 7px 2px 4px; font: 700 13px/1.25 var(--body);
  box-shadow: 0 2px 6px rgba(0,0,0,.35); pointer-events: none; }
.tg .i { width: 15px; height: 15px; color: var(--violet); }
.tg.ht { background: var(--hazard); color: #2b2100; } .tg.ht .i { color: #2b2100; }
.tg::before { content: ''; position: absolute; left: 5px; top: 100%; width: 1.5px; height: 9px; background: rgba(255,255,255,.9); }

/* nhãn lô đất trống */
.lb-trong { margin: -26px 0 0 -40px; min-width: 80px; text-align: center; cursor: pointer; background: var(--lime);
  color: #062b10; border: 2px solid #0b3a16; padding: 3px 9px 4px; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.lb-trong b { display: block; font: 900 23px/1 var(--disp); letter-spacing: .02em; }
.lb-trong small { display: block; white-space: nowrap; font: 700 10px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.lb-trong.on { background: var(--hazard); }
.lb-trong .bm { position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--hazard); display: grid; place-items: center; }
.lb-trong .bm .i { width: 12px; height: 12px; }
.lb-nm, .lb-kdc { margin: -10px 0 0 -40px; width: 80px; text-align: center; pointer-events: none; font: 800 14px/1.05 var(--disp); letter-spacing: .05em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 3px #000, 0 0 8px rgba(40,10,120,.9); }
.lb-kdc { color: #fff6d0; text-shadow: 0 1px 3px #000, 0 0 8px rgba(120,80,0,.9); width: 120px; margin-left: -60px; }

/* khoảng cách */
.ds { margin: -10px 0 0 -26px; pointer-events: none; display: flex; align-items: center; gap: 3px; background: rgba(20,22,27,.85); color: var(--hazard);
  border: 1px dashed var(--hazard); padding: 1px 6px; font: 700 12px/1.4 var(--mono); white-space: nowrap; }
.ds .i { width: 13px; height: 13px; }

/* ---------- màn chào ---------- */
.ld { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; padding: 20px calc(20px + var(--safe-r)) 20px calc(28px + var(--safe-l));
  background: linear-gradient(90deg, rgba(14,15,19,.92) 0, rgba(14,15,19,.78) 38%, rgba(14,15,19,.15) 75%, rgba(14,15,19,.05)); transition: opacity .8s, transform .8s; }
.ld.out { opacity: 0; pointer-events: none; }
.ld-plan { position: absolute; right: 3vw; top: 50%; width: min(34vw, 380px); aspect-ratio: 2474/3507; transform: translateY(-50%) rotate(4deg);
  background: #fff url(../img/quy-hoach-s.webp) center/cover; border: 8px solid #fff; box-shadow: 0 30px 60px rgba(0,0,0,.55); opacity: .95; }
.ld-plan::after { content: 'BẢN ĐỒ QUY HOẠCH'; position: absolute; left: -8px; bottom: -40px; background: var(--hazard); color: #1d1600; font: 800 15px/1 var(--disp); letter-spacing: .12em; padding: 8px 12px; }
.ld-card { position: relative; width: min(520px, 100%); max-height: 100%; overflow: auto; scrollbar-width: none; background: var(--paper); color: #1b1c22;
  border: 2px solid #1b1c22; box-shadow: 10px 10px 0 rgba(0,0,0,.35); }
.ld-head { padding: 16px 20px 12px; border-bottom: 2px solid #1b1c22; position: relative;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(107,60,240,.06) 14px 16px); }
.ld-kick { margin: 0 0 8px; display: flex; justify-content: space-between; gap: 10px; font: 700 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #5a5f6b; }
.ld-pre { margin: 0; font: 800 clamp(16px, 2.6vw, 21px)/1.05 var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--violet2); }
.ld-title { margin: 0; font: 900 clamp(56px, 10vw, 104px)/.82 var(--disp); letter-spacing: .01em; text-transform: uppercase; }
.ld-sub { margin: 8px 0 0; font-size: 13px; color: #4b505b; }
.ld-legend { list-style: none; margin: 0; padding: 12px 20px; display: grid; gap: 6px; border-bottom: 1px dashed #8a8d96; font-size: 14px; }
.ld-legend li { display: flex; align-items: center; gap: 10px; }
.ld-legend b { font: 900 20px/1 var(--disp); }
.sw { display: inline-block; width: 22px; height: 14px; flex: none; border: 1.5px solid #1b1c22; }
.sw-nm { background: var(--violet); }
.sw-trong { background: repeating-linear-gradient(45deg, var(--lime) 0 3px, #d9ffd0 3px 6px); }
.sw-hs { background: var(--violet); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); width: 15px; height: 17px; border: 0; margin: 0 3px; }
.sw-dist { background: repeating-linear-gradient(90deg, var(--hazard) 0 4px, transparent 4px 7px); border-color: var(--hazard); }
.ld-lot { position: relative; margin: 14px 20px 0; height: 34px; border: 2px dashed #1b1c22; background: repeating-linear-gradient(45deg, #e9e5d8 0 6px, #d7d1bf 6px 8px); overflow: hidden; }
.ld-lot-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--violet); }
.ld-lot-t { position: absolute; inset: 0; display: grid; place-items: center; font: 800 16px/1 var(--disp); letter-spacing: .14em; text-transform: uppercase; color: #fff; mix-blend-mode: difference; }
.ld-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: #1b1c22; }
.sw-track { width: 46px; height: 26px; background: #9a9ea8; border: 2px solid #1b1c22; position: relative; transition: background .2s; }
.sw-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border: 2px solid #1b1c22; transition: left .2s; }
.switch[aria-checked="true"] .sw-track { background: var(--lime); }
.switch[aria-checked="true"] .sw-knob { left: 22px; }
.start { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; background: var(--hazard); color: #1d1600; border: 2px solid #1b1c22;
  font: 900 20px/1 var(--disp); letter-spacing: .08em; text-transform: uppercase; box-shadow: 4px 4px 0 #1b1c22; position: relative; transition: transform .15s, box-shadow .15s; }
.start::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 6px; background: repeating-linear-gradient(-45deg, #1b1c22 0 6px, var(--hazard) 6px 12px); }
.start .i { width: 24px; height: 24px; }
.start:not(:disabled):hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 #1b1c22; }
.start:disabled { background: #d8d3c3; cursor: wait; }
.ld-note { margin: 4px 20px 14px; font-size: 11px; color: #6a6e78; }

/* ---------- phiếu điểm bay ---------- */
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#ui > * { pointer-events: auto; }
.plate { position: absolute; top: 14px; left: calc(14px + var(--safe-l)); display: flex; max-width: min(560px, calc(100vw - 110px)); background: rgba(20,22,27,.92);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pl-band { width: 10px; flex: none; background: var(--violet); }
.pl-body { padding: 8px 12px 9px; min-width: 0; }
.pl-kick { margin: 0; display: flex; gap: 10px; font: 600 12px/1.3 var(--mono); color: var(--hazard); letter-spacing: .06em; text-transform: uppercase; }
.pl-kick span + span { color: var(--mute); }
.plate h2 { margin: 2px 0 1px; font: 800 clamp(22px, 3vw, 30px)/1 var(--disp); letter-spacing: .03em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-read { margin: 0; font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-btns { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.pl-btns { flex-direction: row; }
.pb { width: 40px; display: grid; place-items: center; color: var(--text); border-left: 1px solid var(--line); }
.pb:first-child { border-left: 0; }
.pb:hover { background: var(--violet); }

.compass { position: absolute; top: 14px; right: calc(14px + var(--safe-r)); width: 66px; height: 66px; border-radius: 50%; background: rgba(20,22,27,.88);
  border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.compass svg { width: 100%; height: 100%; display: block; }
.c-ring { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 1.5; stroke-dasharray: 2 4.3; }
.c-n { fill: var(--red); } .c-s { fill: #e9e9ef; }
.c-t { fill: var(--text); font: 800 9px var(--disp); text-anchor: middle; }
.c-fov { fill: rgba(255,194,26,.28); stroke: var(--hazard); stroke-width: 1; }

.near { position: absolute; top: 112px; left: calc(14px + var(--safe-l)); display: flex; flex-direction: column; gap: 5px; max-width: 260px; }
.near p { margin: 0 0 1px; font: 700 11px/1 var(--mono); color: var(--hazard); letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 1px 3px #000; }
.near button { display: flex; align-items: center; gap: 7px; text-align: left; background: rgba(20,22,27,.78); border: 1px solid var(--line); padding: 4px 9px 4px 4px; font-size: 13px; }
.near button img { width: 34px; height: 24px; object-fit: cover; flex: none; }
.near button small { margin-left: auto; padding-left: 8px; font: 600 11px var(--mono); color: var(--mute); }
.near button:hover { border-color: var(--hazard); }

/* lớp hiển thị */
.layers { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(70px + var(--safe-b)); display: flex; gap: 6px; max-width: calc(100vw - 20px); overflow-x: auto; scrollbar-width: none; }
.ly { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 6px 11px 6px 8px; background: rgba(20,22,27,.75); border: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.ly .sw { border-color: rgba(255,255,255,.6); opacity: .45; }
.ly.on { color: var(--text); background: rgba(20,22,27,.92); border-color: rgba(255,255,255,.35); }
.ly.on .sw { opacity: 1; }

/* thanh công cụ: mép băng vàng đen công trường */
.tools { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); display: flex; align-items: stretch; max-width: calc(100vw - 16px);
  overflow-x: auto; scrollbar-width: none; background: var(--ink); border: 1px solid #000; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.tools::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 8px, #111 8px 16px); }
.tb { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 12px 13px 9px; color: var(--text); white-space: nowrap; font: 800 16px/1 var(--disp); letter-spacing: .07em; text-transform: uppercase; }
.tb.ic { padding: 12px 11px 9px; }
.tb:hover { background: var(--ink3); }
.tb.on { color: var(--hazard); }
.tb.off { color: #666c78; }
.tb em { position: absolute; top: 6px; right: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--hazard); color: #1d1600; font: 700 11px/17px var(--mono); text-align: center; font-style: normal; padding: 0 4px; }
.tsep { width: 1px; background: var(--line); margin: 10px 4px 6px; }

/* ---------- bảng trượt ---------- */
.sheet { position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--paper); color: #1b1c22; border-left: 2px solid #1b1c22;
  box-shadow: -20px 0 50px rgba(0,0,0,.45); overflow-y: auto; padding: 22px 22px calc(26px + var(--safe-b)); animation: shIn .3s ease; }
.sheet.wide { width: min(620px, 100vw); }
@keyframes shIn { from { transform: translateX(30px); opacity: 0; } }
.sh-x { position: sticky; top: 0; float: right; width: 38px; height: 38px; display: grid; place-items: center; background: #1b1c22; color: #fff; margin: -6px -6px 0 10px; z-index: 2; }
.sh-kick { margin: 0 0 4px; font: 700 12px/1.3 var(--mono); color: var(--violet2); letter-spacing: .08em; text-transform: uppercase; }
.sheet h2 { margin: 0 0 10px; font: 900 34px/.95 var(--disp); letter-spacing: .02em; text-transform: uppercase; }
.sheet h3 { margin: 18px 0 8px; font: 800 18px/1 var(--disp); letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.sheet p { margin: 0 0 10px; }
.sheet .fine { font-size: 12px; color: #61656f; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 14px; padding: 10px 12px; background: #fff; border: 1.5px solid #1b1c22; font-size: 14px; }
.kv dt { font: 600 12px/1.6 var(--mono); color: #61656f; text-transform: uppercase; letter-spacing: .05em; }
.kv dd { margin: 0; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; background: #1b1c22; color: #fff; font: 800 16px/1 var(--disp); letter-spacing: .08em; text-transform: uppercase; margin: 4px 6px 4px 0; }
.btn.hz { background: var(--hazard); color: #1d1600; border: 2px solid #1b1c22; }
.btn.ghost { background: transparent; color: #1b1c22; border: 2px solid #1b1c22; }

.grp { margin: 0 0 14px; }
.grp h3 .sw { width: 18px; height: 18px; }
.sc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.sc-list button { display: block; width: 100%; text-align: left; background: #fff; border: 1.5px solid #1b1c22; padding: 0 0 5px; font-size: 12.5px; line-height: 1.25; }
.sc-list img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 5px; background: #ccc; }
.sc-list span { display: block; padding: 0 6px; }
.sc-list small { display: block; padding: 0 6px; font: 600 11px var(--mono); color: #61656f; }
.sc-list .on { outline: 3px solid var(--hazard); outline-offset: -3px; background: #fff7d6; }

.lot-big { display: flex; align-items: flex-end; gap: 12px; margin: 6px 0 4px; }
.lot-big b { font: 900 76px/.8 var(--disp); color: #0b3a16; }
.lot-big span { font: 800 22px/1 var(--disp); text-transform: uppercase; letter-spacing: .1em; padding-bottom: 6px; }
.lot-tag { display: inline-block; background: var(--lime); border: 1.5px solid #0b3a16; padding: 3px 8px; font: 700 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; margin: 0 6px 6px 0; }
.short { list-style: none; padding: 0; margin: 0 0 12px; }
.short li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid #1b1c22; padding: 8px 10px; margin-bottom: 6px; }
.short li b { font: 900 26px/1 var(--disp); color: #0b3a16; min-width: 76px; }
.short li span { flex: 1; font-size: 13px; }
.short li button { width: 30px; height: 30px; display: grid; place-items: center; }
.short-sum { display: flex; justify-content: space-between; align-items: baseline; border-top: 3px double #1b1c22; padding-top: 8px; font: 800 20px/1 var(--disp); text-transform: uppercase; letter-spacing: .06em; }
.short-sum b { font-size: 34px; }

.map-tabs { display: flex; gap: 0; margin: 0 0 10px; border: 2px solid #1b1c22; width: max-content; }
.map-tabs button { padding: 8px 14px; font: 800 15px/1 var(--disp); letter-spacing: .08em; text-transform: uppercase; }
.map-tabs button.on { background: #1b1c22; color: var(--hazard); }
#lmap { height: min(60vh, 520px); border: 2px solid #1b1c22; background: #dcd8cb; }
.plan-box { height: min(66vh, 620px); overflow: auto; border: 2px solid #1b1c22; background: #fff; cursor: grab; }
.plan-box img { display: block; width: 100%; transition: width .2s; }
.plan-zoom { display: flex; gap: 6px; margin-top: 8px; }
.mk-dot { width: 18px; height: 20px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); border: 0; box-shadow: 0 0 0 2px #fff inset; }
.mk-dot.cur { transform: scale(1.5); box-shadow: 0 0 0 3px var(--hazard) inset; }
.leaflet-container { font: 13px var(--body); }
.leaflet-tooltip { font: 700 13px var(--body); border-radius: 0; border: 1.5px solid #1b1c22; }

.share { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.qr { background: #fff; padding: 8px; border: 1.5px solid #1b1c22; }
.qr img { display: block; }
.url { font: 12px var(--mono); word-break: break-all; background: #fff; border: 1px dashed #1b1c22; padding: 6px 8px; margin-bottom: 8px; }
.ck { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 8px; }

.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(120px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .3s;
  background: var(--hazard); color: #1d1600; border: 2px solid #1b1c22; padding: 8px 14px; font-weight: 700; font-size: 14px; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- màn nhỏ / thấp ---------- */
@media (max-width: 900px) {
  .ld-plan { display: none; }
  .ld { background: linear-gradient(180deg, rgba(14,15,19,.55), rgba(14,15,19,.85)); justify-content: center; }
  .near { display: none; }
}
@media (max-width: 640px) {
  .plate { left: 8px; top: 8px; max-width: calc(100vw - 16px - 64px); }
  .plate h2 { font-size: 21px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.02; }
  .pl-kick { white-space: nowrap; overflow: hidden; font-size: 11px; gap: 8px; }
  .pl-kick span + span { overflow: hidden; text-overflow: ellipsis; }
  .pl-btns .pb { width: 34px; }
  .compass { top: 8px; right: 8px; width: 54px; height: 54px; }
  .tb:not(.ic) span { display: none; }
  .tb { padding: 12px 11px 9px; }
  .layers { justify-content: flex-start; left: 8px; transform: none; max-width: calc(100vw - 16px); }
  .ly { font-size: 12px; padding: 5px 9px 5px 7px; }
  .pl-read { font-size: 11px; }
}
@media (max-height: 520px) {
  .ld { padding-top: 10px; padding-bottom: 10px; }
  .ld-card { display: grid; grid-template-columns: 1.1fr 1fr; width: min(760px, 100%); }
  .ld-head { grid-row: span 3; border-bottom: 0; border-right: 2px solid #1b1c22; padding: 12px 16px; }
  .ld-title { font-size: 64px; }
  .ld-legend { padding: 10px 14px; font-size: 13px; gap: 3px; }
  .ld-lot { margin: 10px 14px 0; height: 28px; }
  .ld-ctl { padding: 10px 14px 4px; gap: 8px; }
  .start { font-size: 17px; padding: 10px 14px 10px 12px; }
  .ld-note { grid-column: 1 / -1; margin: 0; padding: 6px 16px 8px; border-top: 1px dashed #8a8d96; }
  .ld-plan { display: none; }
  .near { display: none; }
  .layers { bottom: calc(54px + var(--safe-b)); left: auto; right: calc(10px + var(--safe-r)); transform: none; flex-direction: column; align-items: flex-end; }
  .ly { font-size: 12px; padding: 4px 9px 4px 7px; }
  .tb, .tb.ic { padding: 10px 10px 7px; }
  .tb:not(.ic) span { display: none; }
  .tools { bottom: calc(6px + var(--safe-b)); }
  .plate { top: 8px; left: calc(8px + var(--safe-l)); }
  .plate h2 { font-size: 22px; }
  .compass { top: 8px; width: 54px; height: 54px; }
}
@media (max-height: 420px) and (max-width: 940px) {
  .ld-sub { display: none; }
  .ld-title { font-size: 54px; }
  .ld-kick { margin-bottom: 4px; }
}
@media (max-width: 560px) and (min-height: 521px) {
  .ld { padding: 14px; align-items: flex-end; }
  .ld-title { font-size: 74px; }
}
