/* Unit start board. Scoped to .unit-board; all helpers use ub-* names. */
.unit-board{--ub-bg:#f7f3ec;--ub-paper:#fffdf9;--ub-ink:#1e3832;--ub-muted:#5f706a;--ub-line:#e2dbcf;--ub-teal:#1d6a5a;--ub-teal-ink:#ffffff;--ub-teal-soft:#e2efe8;--ub-peach:#f3c9ad;--ub-peach-soft:#fcede2;--ub-peach-ink:#7d4322;--ub-alert:#b4532c;--ub-alert-soft:#fbe4d9;--ub-slate-soft:#ece9e2;--ub-cell:84px;--ub-floor:56px;
  box-sizing:border-box;width:100%;max-width:100%;min-width:0;margin:0 auto;padding:16px max(12px,env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  background:var(--ub-bg);color:var(--ub-ink);border:1px solid var(--ub-line);border-radius:14px;font-size:14px;line-height:1.55;word-break:keep-all;overflow-wrap:anywhere}
.unit-board *,.unit-board *::before,.unit-board *::after{box-sizing:border-box}
.unit-board h2,.unit-board h3,.unit-board p,.unit-board ul{margin:0}
.unit-board button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.unit-board button:focus-visible,.unit-board input:focus-visible,.unit-board .ub-scroll:focus-visible,.unit-board summary:focus-visible{outline:3px solid #7cc6b4;outline-offset:2px}
.unit-board .ub-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.unit-board .ub-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:14px}
.unit-board .ub-title{min-width:0}
.unit-board .ub-eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--ub-teal)}
.unit-board h2{font-size:22px;letter-spacing:-.4px;line-height:1.3;margin-top:2px}
.unit-board .ub-updated{font-size:12px;color:var(--ub-muted);margin-top:4px}
.unit-board .ub-actions{display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
.unit-board .ub-btn{min-height:44px;padding:8px 14px;border:1px solid var(--ub-line);border-radius:10px;background:var(--ub-paper);font-size:14px;font-weight:600;display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.3;text-align:left;max-width:100%}
.unit-board .ub-btn:hover{border-color:#b9b0a1}
.unit-board .ub-btn-primary{background:var(--ub-teal);border-color:var(--ub-teal);color:var(--ub-teal-ink)}
.unit-board .ub-btn-primary:hover{background:#17584b;border-color:#17584b}
.unit-board .ub-btn small{font-size:12px;font-weight:500;opacity:.9;overflow-wrap:anywhere}

.unit-board .ub-banner{margin-bottom:12px;padding:10px 12px;border:1px solid #e7c9ae;border-left:4px solid #d39a6f;border-radius:10px;background:var(--ub-peach-soft);color:var(--ub-peach-ink);font-size:13px}
.unit-board .ub-banner strong{margin-right:4px}

.unit-board .ub-buildings{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;padding:2px 2px 8px;margin:0 -2px 6px;scrollbar-width:thin}
.unit-board .ub-building{flex:0 0 auto;min-height:44px;min-width:88px;padding:7px 16px;border:1px solid var(--ub-line);border-radius:999px;background:var(--ub-paper);display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.25}
.unit-board .ub-building span{font-weight:700;font-size:15px}
.unit-board .ub-building small{font-size:11px;color:var(--ub-muted);white-space:nowrap}
.unit-board .ub-building.ub-on{background:var(--ub-teal);border-color:var(--ub-teal);color:var(--ub-teal-ink)}
.unit-board .ub-building.ub-on small{color:#d6ebe3}

.unit-board .ub-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
.unit-board .ub-card{min-height:64px;padding:10px 12px;border:1px solid var(--ub-line);border-radius:12px;background:var(--ub-paper);text-align:left;display:flex;flex-direction:column;justify-content:space-between;gap:2px;min-width:0}
.unit-board .ub-card-all{grid-column:1/-1}
.unit-board .ub-card-label{font-size:12px;color:var(--ub-muted);font-weight:600}
.unit-board .ub-card strong{font-size:22px;line-height:1.1;letter-spacing:-.5px;font-variant-numeric:tabular-nums}
.unit-board .ub-card strong small{font-size:12px;font-weight:500;margin-left:3px;color:var(--ub-muted)}
.unit-board .ub-card-note{font-size:11px;color:var(--ub-alert);font-weight:600}
.unit-board .ub-card-open strong{color:var(--ub-peach-ink)}
.unit-board .ub-card-closed strong{color:var(--ub-teal)}
.unit-board .ub-card.ub-on{border-color:var(--ub-teal);box-shadow:inset 0 0 0 1px var(--ub-teal);background:var(--ub-teal-soft)}

.unit-board .ub-tools{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.unit-board .ub-search input{width:100%;min-height:44px;padding:9px 12px;border:1px solid var(--ub-line);border-radius:10px;background:var(--ub-paper);color:var(--ub-ink);font:inherit;font-size:16px}
.unit-board .ub-search input:focus{border-color:var(--ub-teal);outline:2px solid #d3e9e0;outline-offset:0}
.unit-board .ub-count{font-size:12px;color:var(--ub-muted)}
.unit-board .ub-help{font-size:12px;color:var(--ub-muted);margin-bottom:12px;padding:8px 10px;border-radius:8px;background:#efeae1}
.unit-board .ub-nomatch,.unit-board .ub-note{font-size:13px;color:var(--ub-peach-ink);margin-bottom:10px}
.unit-board .ub-note{color:var(--ub-muted);margin:10px 0 0}

/* Tower: paper elevation with a roof line and ground line. */
.unit-board .ub-tower{position:relative;max-width:100%;min-width:0;border:1px solid var(--ub-line);border-top:4px solid var(--ub-teal);border-radius:12px 12px 6px 6px;background:var(--ub-paper);box-shadow:0 6px 0 -3px #d9d1c3}
.unit-board .ub-scroll{max-width:100%;max-height:min(70vh,760px);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-radius:8px 8px 4px 4px;scrollbar-width:thin}
.unit-board .ub-grid{border-collapse:separate;border-spacing:0;min-width:100%;font-variant-numeric:tabular-nums}
.unit-board .ub-grid th,.unit-board .ub-grid td{padding:3px}
.unit-board .ub-grid thead th,.unit-board .ub-grid tfoot th{font-size:12px;font-weight:700;color:var(--ub-muted);background:var(--ub-paper);text-align:center;height:34px;min-width:var(--ub-cell)}
.unit-board .ub-grid thead th{position:sticky;top:0;z-index:2;border-bottom:1px solid var(--ub-line)}
.unit-board .ub-grid tfoot th{border-top:1px solid var(--ub-line)}
.unit-board .ub-grid .ub-corner,.unit-board .ub-grid .ub-floor{position:sticky;left:0;min-width:var(--ub-floor);width:var(--ub-floor);background:var(--ub-paper);border-right:1px solid var(--ub-line);text-align:center}
.unit-board .ub-grid .ub-floor{z-index:1;font-size:13px;font-weight:700;color:var(--ub-ink)}
.unit-board .ub-grid thead .ub-corner{z-index:3}
.unit-board .ub-grid tfoot .ub-corner{z-index:1}
.unit-board .ub-grid tbody tr:last-child td,.unit-board .ub-grid tbody tr:last-child th{border-bottom:3px solid #cfc6b6}
.unit-board .ub-cell{min-width:var(--ub-cell);vertical-align:top;height:1px}

.unit-board .ub-unit{width:100%;height:100%;min-height:60px;min-width:44px;padding:6px 7px;border:1px solid var(--ub-line);border-radius:9px;background:var(--ub-paper);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;text-align:left;line-height:1.25;transition:border-color .12s,box-shadow .12s}
.unit-board .ub-unit:hover{border-color:#a99f8f}
.unit-board .ub-unit-no{font-size:15px;font-weight:800;letter-spacing:-.2px}
.unit-board .ub-unit-state{font-size:12px;font-weight:700}
.unit-board .ub-unit-sub{font-size:11px;color:var(--ub-muted)}
.unit-board .ub-selected{box-shadow:0 0 0 3px #1d6a5a55;border-color:var(--ub-teal)}
.unit-board .ub-dim{opacity:.38;filter:saturate(.4)}
.unit-board .ub-dim:hover,.unit-board .ub-dim:focus-visible{opacity:.8}

.unit-board .ub-tone-empty{background:var(--ub-paper);border-color:var(--ub-line)}
.unit-board .ub-tone-empty .ub-unit-state{color:var(--ub-muted);font-weight:600}
.unit-board .ub-tone-records{background:var(--ub-slate-soft);border-color:#d3cdc1}
.unit-board .ub-tone-records .ub-unit-state{color:#4f5b57}
.unit-board .ub-tone-open{background:var(--ub-peach-soft);border-color:var(--ub-peach)}
.unit-board .ub-tone-open .ub-unit-state{color:var(--ub-peach-ink)}
.unit-board .ub-tone-closed{background:var(--ub-teal-soft);border-color:#a9cfc0}
.unit-board .ub-tone-closed .ub-unit-state{color:var(--ub-teal)}
.unit-board .ub-tone-pending{background:repeating-linear-gradient(135deg,var(--ub-peach-soft) 0 8px,#fff6ef 8px 16px);border:2px dashed #d9a07b}
.unit-board .ub-tone-pending .ub-unit-state{color:var(--ub-peach-ink)}
.unit-board .ub-tone-attention{background:var(--ub-alert-soft);border:2px solid var(--ub-alert)}
.unit-board .ub-tone-attention .ub-unit-state{color:var(--ub-alert)}
.unit-board .ub-tone-unknown{background:#f2f0ec;border:2px dashed #b9b2a6}
.unit-board .ub-tone-unknown .ub-unit-state{color:#5b5650}

.unit-board .ub-none{display:flex;align-items:center;justify-content:center;min-height:60px;height:100%;padding:4px;border:1px dashed #e6e0d5;border-radius:9px;color:#9c9488;font-size:11px;text-align:center;line-height:1.25;user-select:none}
.unit-board .ub-dup{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60px;height:100%;padding:4px;border:2px dotted #c58a62;border-radius:9px;background:#fff7f0;color:var(--ub-peach-ink);font-size:12px;font-weight:700;text-align:center;line-height:1.25}
.unit-board .ub-dup small{font-size:11px;font-weight:500}

.unit-board .ub-unplaced{margin-top:14px;padding:12px;border:1px solid var(--ub-line);border-radius:12px;background:var(--ub-paper)}
.unit-board .ub-unplaced h3{font-size:15px}
.unit-board .ub-unplaced p{font-size:12px;color:var(--ub-muted);margin:2px 0 10px}
.unit-board .ub-unplaced ul{list-style:none;padding:0;display:grid;grid-template-columns:1fr;gap:8px}
.unit-board .ub-row{min-height:56px}

.unit-board .ub-legend-wrap{margin-top:14px}
.unit-board .ub-legend-wrap summary{min-height:44px;display:flex;align-items:center;font-size:13px;font-weight:700;cursor:pointer;color:var(--ub-teal)}
.unit-board .ub-legend{list-style:none;padding:0;display:grid;grid-template-columns:1fr;gap:6px 16px;font-size:12px;color:var(--ub-muted)}
.unit-board .ub-legend li{display:flex;align-items:flex-start;gap:8px}
.unit-board .ub-legend b{color:var(--ub-ink);margin-right:4px;white-space:nowrap}
.unit-board .ub-sw{flex:0 0 auto;width:18px;height:18px;margin-top:1px;border-radius:5px;border:1px solid var(--ub-line)}
.unit-board .ub-sw-none{border:1px dashed #cfc7ba;background:transparent}

.unit-board .ub-empty{padding:28px 12px;text-align:center;border:1px dashed var(--ub-line);border-radius:12px;background:var(--ub-paper)}
.unit-board .ub-empty h3{font-size:17px}
.unit-board .ub-empty p{font-size:13px;color:var(--ub-muted);margin:6px auto 14px;max-width:420px}
.unit-board .ub-empty-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}

@media (max-width:389px){
  .unit-board{--ub-cell:72px;--ub-floor:46px;border-radius:10px;font-size:13px}
  .unit-board h2{font-size:19px}
  .unit-board .ub-actions{width:100%}
  .unit-board .ub-actions .ub-btn{flex:1 1 auto}
  .unit-board .ub-card strong{font-size:20px}
  .unit-board .ub-unit{padding:5px}
  .unit-board .ub-unit-no{font-size:14px}
}
@media (min-width:690px){
  .unit-board{padding:20px max(20px,env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
  .unit-board .ub-cards{grid-template-columns:repeat(5,minmax(0,1fr))}
  .unit-board .ub-card-all{grid-column:auto}
  .unit-board .ub-tools{flex-direction:row;align-items:center;gap:14px}
  .unit-board .ub-search{flex:0 1 320px}
  .unit-board .ub-search input{font-size:14px}
  .unit-board .ub-legend{grid-template-columns:repeat(2,minmax(0,1fr))}
  .unit-board .ub-unplaced ul{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
}
@media (min-width:1104px){
  .unit-board{--ub-cell:96px;--ub-floor:64px;padding:24px 28px}
  .unit-board h2{font-size:25px}
  .unit-board .ub-unit{min-height:64px}
  .unit-board .ub-legend{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (min-width:1440px){
  .unit-board{--ub-cell:108px;max-width:1600px}
}
@media (hover:none){.unit-board .ub-unit:hover{border-color:inherit}}
@media (prefers-reduced-motion:reduce){.unit-board .ub-unit{transition:none}}
@media (forced-colors:active){.unit-board .ub-unit,.unit-board .ub-card,.unit-board .ub-building{border:1px solid ButtonText}.unit-board .ub-selected,.unit-board .ub-on{outline:3px solid Highlight}}
@media print{
  .unit-board{border:0;padding:0;background:#fff;max-width:none;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .unit-board .ub-actions,.unit-board .ub-tools .ub-search,.unit-board .ub-buildings button:not(.ub-on),.unit-board .ub-legend-wrap summary{display:none}
  .unit-board .ub-legend-wrap{display:block}
  .unit-board .ub-scroll{max-height:none;overflow:visible}
  .unit-board .ub-tower{box-shadow:none}
  .unit-board .ub-grid thead th,.unit-board .ub-grid .ub-corner,.unit-board .ub-grid .ub-floor{position:static}
  .unit-board .ub-grid tr{break-inside:avoid}
  .unit-board .ub-grid thead{display:table-header-group}
  .unit-board .ub-grid tfoot{display:none}
  .unit-board .ub-unit,.unit-board .ub-none,.unit-board .ub-dup{min-height:40px}
}

/* Site layout: sold marks, unregistered layout units, refuge floor and shared spaces. */
.unit-board .ub-unit-top{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-width:0}
.unit-board .ub-sale{display:inline-flex;align-items:center;flex:0 0 auto;padding:1px 7px;border:1px solid #3d4f86;border-radius:999px;background:#eef1fb;color:#2c3b70;font-size:11px;font-weight:800;line-height:1.5;white-space:nowrap}
.unit-board .ub-tone-layout{background:#fbfaf7;border:1.5px dashed #b9b0a1;color:#4f5d58}
.unit-board .ub-tone-layout .ub-unit-state{color:#6b6458;font-weight:700}
.unit-board .ub-tone-layout:hover{border-color:var(--ub-teal);background:#f3f8f5}
.unit-board .ub-special{display:flex;align-items:center;justify-content:center;min-height:52px;border-radius:10px;background:repeating-linear-gradient(135deg,#efe9dd 0 8px,#f6f1e8 8px 16px);color:#6d6455;font-weight:800;font-size:13px}
.unit-board .ub-refuge-row td{padding:4px}
.unit-board .ub-refuge{display:flex;align-items:center;justify-content:center;min-height:34px;border-radius:8px;background:#dedad3;color:#4f4a42;font-weight:800;letter-spacing:.3em}
.unit-board .ub-line-type{display:block;font-size:11px;font-weight:600;color:var(--ub-muted);letter-spacing:0}
.unit-board .ub-legend .ub-sale{margin-right:6px}
.unit-board .ub-sw.ub-tone-layout{border:1.5px dashed #b9b0a1;background:#fbfaf7}
.unit-board .ub-card-sale strong{color:#2c3b70}
.unit-board .ub-card-unregistered strong{color:#6b6458}
@media (min-width:690px){.unit-board .ub-cards.ub-cards-layout{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (min-width:1280px){.unit-board .ub-cards.ub-cards-layout{grid-template-columns:repeat(7,minmax(0,1fr))}}
@media print{.unit-board .ub-sale{border-color:#000;color:#000;background:none}.unit-board .ub-tone-layout{border-style:dashed}}
.unit-board .ub-tower{overflow:hidden}

.unit-board .ub-badges{display:inline-flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.unit-board .ub-done{display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;background:#b9708f;color:#fff;font-size:11px;font-weight:800;line-height:1.5;white-space:nowrap}
.unit-board .ub-legend .ub-done{margin-right:6px}
@media print{.unit-board .ub-done{background:none;color:#000;border:1px solid #000}}

/* Phone portrait: all five lines fit without squeezing digits; numbers never break. */
.unit-board .ub-grid{word-break:keep-all;overflow-wrap:normal}
.unit-board .ub-unit-no{white-space:nowrap}
.unit-board .ub-short{display:none}
@media (max-width:600px){
  .unit-board{--ub-cell:0px;--ub-floor:34px;padding:12px 10px}
  .unit-board .ub-grid{table-layout:fixed;width:100%;min-width:290px}
  .unit-board .ub-grid th,.unit-board .ub-grid td{padding:2px}
  .unit-board .ub-grid thead th,.unit-board .ub-grid tfoot th{min-width:0;height:30px;font-size:11px;line-height:1.15}
  .unit-board .ub-grid .ub-floor{font-size:11px;letter-spacing:-.3px}
  .unit-board .ub-line-type{font-size:10px}
  .unit-board .ub-cell{min-width:0}
  .unit-board .ub-unit{min-width:0;min-height:56px;padding:4px 5px;border-radius:7px;gap:1px}
  .unit-board .ub-unit-top{flex-wrap:wrap;justify-content:flex-start;gap:2px 3px}
  .unit-board .ub-unit-no{font-size:14px;letter-spacing:-.4px}
  .unit-board .ub-badges{justify-content:flex-start;gap:2px}
  .unit-board .ub-sale,.unit-board .ub-done{font-size:9.5px;padding:0 4px;line-height:1.45}
  .unit-board .ub-unit-state{font-size:11px;line-height:1.2}
  .unit-board .ub-long{display:none}
  .unit-board .ub-short{display:inline}
  .unit-board .ub-unit-type{display:none}
  .unit-board .ub-unit-sub{font-size:10px;line-height:1.2}
  .unit-board .ub-none{min-height:56px;font-size:10px;border-radius:7px}
  .unit-board .ub-special{min-height:56px;font-size:12px;border-radius:7px}
  .unit-board .ub-refuge{min-height:28px;font-size:12px;letter-spacing:.15em}
}

.unit-board .ub-tone-manual{background:#f1eef8;border:1px solid #c9bfe0;color:#463b63}
.unit-board .ub-tone-excluded,.unit-board .ub-tone-excluded:disabled{background:#ebe9e5;border:1px solid #d6d2ca;color:#8b867e;opacity:1}
.unit-board .ub-tone-excluded:disabled{cursor:not-allowed}
.unit-board .ub-tone-excluded .ub-unit-state{color:#8b867e;font-weight:700}
.unit-board .ub-sw.ub-tone-excluded{background:#ebe9e5;border:1px solid #d6d2ca}
.unit-board .ub-tone-manual .ub-unit-state{color:#5a4a86;font-weight:800}
.unit-board .ub-sw.ub-tone-manual{background:#f1eef8;border:1px solid #c9bfe0}
.unit-board .ub-card-manual strong{color:#5a4a86}
@media print{.unit-board .ub-tone-manual{background:none}}
@media (max-width:380px){.unit-board{--ub-floor:30px;padding:10px 6px}.unit-board .ub-grid{min-width:0}.unit-board .ub-grid th,.unit-board .ub-grid td{padding:1.5px}.unit-board .ub-unit{padding:4px 3px}.unit-board .ub-unit-no{font-size:13px}.unit-board .ub-grid .ub-floor{font-size:10px}}

/* Sold units: out of scope, gray and not pressable. */

/* Summary: five cards plus the search box in the next free cell. */
.unit-board .ub-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
.unit-board .ub-card-all{grid-column:auto}
.unit-board .ub-card-search{display:flex;min-width:0;grid-column:auto / -1}
.unit-board .ub-card-search input{height:100%;min-height:54px;font-size:15px}
.unit-board .ub-card-pct{display:block;margin-top:2px;font-size:13px;font-style:normal;font-weight:800;color:var(--ub-teal);letter-spacing:0}
.unit-board .ub-card-done strong{color:var(--ub-teal)}
.unit-board .ub-card-sale strong{color:#77726a}
@media (min-width:1001px){.unit-board .ub-cards{grid-template-columns:repeat(6,minmax(0,1fr))}}
/* Reaching the end of the unit grid hands further scrolling to the page (both directions). */
.unit-board .ub-scroll{overscroll-behavior-y:auto;overscroll-behavior-x:contain}

/* 점검진행중: registered, not yet finished with 점검 끝! */
.unit-board .ub-tone-progress{background:#eef4fa;border-color:#b9cde2}
.unit-board .ub-tone-progress .ub-unit-state{color:#3d6488}

/* 수기작성 note under a registered hand-written unit's state */
.unit-board .ub-manual-note{color:#6a5a98;font-weight:700}

/* Master-only NAS disk card */
.unit-board .ub-nas{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 12px;margin:-4px 0 12px;padding:10px 14px;border-radius:12px;background:#fff;box-shadow:0 1px 3px rgba(20,40,30,.08),0 4px 12px rgba(20,40,30,.05)}
.unit-board .ub-nas .ub-nas-title{font-size:13px;color:#4a5a52;font-weight:600}
.unit-board .ub-nas .ub-nas-title em{font-style:normal;font-size:11px;margin-left:6px;padding:1px 6px;border-radius:8px;background:#eef3f0;color:#1f5a46}
.unit-board .ub-nas strong{font-size:17px;justify-self:end;white-space:nowrap}
.unit-board .ub-nas strong small{font-size:12px;color:#6b7a72;font-weight:500}
.unit-board .ub-nas strong b{font-size:13px;color:#1f5a46;margin-left:4px}
.unit-board .ub-nas .ub-nas-bar{grid-column:1/-1;height:8px;border-radius:5px;background:#e8ece9;overflow:hidden}
.unit-board .ub-nas .ub-nas-bar i{display:block;height:100%;background:#1f6b52;border-radius:5px}
.unit-board .ub-nas.ub-nas-warn .ub-nas-bar i{background:#c0392b}
.unit-board .ub-nas .ub-nas-sub{grid-column:1/-1;font-size:12px;color:#6b7a72}
.unit-board .ub-nas.ub-nas-off{grid-template-columns:auto 1fr}
.unit-board .ub-nas.ub-nas-off .ub-nas-sub{grid-column:auto;justify-self:end}

/* 특이세대 보고 label under the unit state */
.unit-board .ub-site-note{color:#a3530b;font-weight:700}
/* 하자 전체목록 엑셀 내려받기 (이슈 #15): owner-only tool row under the cards. */
.unit-board .ub-tools{display:flex;justify-content:flex-end;margin:-4px 0 12px}
.unit-board .ub-tools .ub-btn{min-height:40px;align-items:center}
@media print{.unit-board .ub-tools{display:none}}
/* 엑셀 열 선택 팝업 (이슈 #17): the column lists sit in the shared #modal inside a .unit-board.ub-export wrapper (board box styles reset).
   Two columns of boxes on a phone; nothing is wider than the dialog. The footer buttons stay outside the wrapper. */
.unit-board.ub-export{width:auto;margin:0;padding:0;border:0;border-radius:0;background:none;color:#263a44;font-size:13px}
.unit-board.ub-export .ub-export-group{min-width:0;margin:0 0 12px;padding:8px 12px 12px;border:1px solid #e3eaee;border-radius:9px}
.unit-board.ub-export legend{padding:0 4px;font-size:13px;font-weight:700;color:#334e59}
.unit-board.ub-export legend small{margin-left:4px;font-size:11px;font-weight:400;color:#8a9ea7}
.unit-board.ub-export .ub-export-cols{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:6px}
.unit-board.ub-export .ub-export-col{display:flex;align-items:center;gap:7px;min-width:0;min-height:40px;padding:6px 9px;border:1px solid #dce6ea;border-radius:7px;background:#fff;cursor:pointer;overflow-wrap:anywhere}
.unit-board.ub-export .ub-export-col input{flex:0 0 auto;width:18px;height:18px;margin:0}
.unit-board.ub-export .ub-export-col b{min-width:1em;font-weight:600;color:#8a9ea7}
.unit-board.ub-export .ub-export-locked{background:#f3f6f7;color:#5b7480;cursor:default}
.unit-board.ub-export .ub-export-all{margin:0 0 8px}
@media (max-width:420px){.unit-board.ub-export .ub-export-cols{grid-template-columns:repeat(2,minmax(0,1fr))}.unit-board.ub-export .ub-export-group{padding:6px 8px 10px}}
/* 사진대지 내려받기 (이슈 #19): the tool row holds two buttons; the 세대 선택 sits in the shared #modal as form.unit-board.photo-sheet.
   The grid is the 현황판's own floor × line layout, shrunk to fit a 360px phone (fixed table, no sideways scroll). */
.unit-board .ub-tools{flex-direction:row;flex-wrap:wrap;gap:8px}
.unit-board.photo-sheet{width:auto;margin:0;padding:0;border:0;border-radius:0;background:none;--ps-ink:#1e3832;--ps-muted:#5f706a;--ps-line:#e2dbcf;--ps-teal:#1d6a5a;--ps-soft:#e2efe8;--ps-paper:#fffdf9;--ps-bg:#f7f3ec;min-width:0;color:var(--ps-ink);font-size:13px;line-height:1.45;word-break:keep-all}
.unit-board.photo-sheet *,.unit-board.photo-sheet *::before,.unit-board.photo-sheet *::after{box-sizing:border-box}
.unit-board.photo-sheet button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.unit-board.photo-sheet button:focus-visible,.unit-board.photo-sheet label:focus-within,.unit-board.photo-sheet .ps-scroll:focus-visible{outline:3px solid #7cc6b4;outline-offset:1px}
.unit-board.photo-sheet .ps-lead{margin:0 0 12px;padding:8px 11px;border-radius:9px;background:var(--ps-bg);font-size:12px;color:var(--ps-muted)}
.unit-board.photo-sheet .ps-section{min-width:0;margin:0 0 10px;padding:10px 12px 12px;border:1px solid var(--ps-line);border-radius:12px;background:var(--ps-paper)}
.unit-board.photo-sheet .ps-section-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px;margin-bottom:8px}
.unit-board.photo-sheet h3{margin:0;font-size:14px;font-weight:800;letter-spacing:-.2px}
.unit-board.photo-sheet h3 small{margin-left:6px;font-size:12px;font-weight:600;color:var(--ps-muted);font-variant-numeric:tabular-nums}
.unit-board.photo-sheet .ps-tools{display:flex;flex-wrap:wrap;gap:6px}
.unit-board.photo-sheet .ps-chip{min-height:34px;padding:4px 12px;border:1px solid var(--ps-line);border-radius:999px;background:#fff;font-size:12px;font-weight:700}
.unit-board.photo-sheet .ps-chip:hover{border-color:#b9b0a1}
.unit-board.photo-sheet .ps-buildings{display:flex;gap:6px;overflow-x:auto;margin:0 0 8px;padding-bottom:2px}
.unit-board.photo-sheet .ps-buildings button{flex:0 0 auto;min-height:34px;padding:4px 14px;border:1px solid var(--ps-line);border-radius:999px;background:#fff;font-weight:700}
.unit-board.photo-sheet .ps-buildings .ps-on{background:var(--ps-teal);border-color:var(--ps-teal);color:#fff}
.unit-board.photo-sheet .ps-scroll{max-height:min(46vh,430px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--ps-line);border-top:3px solid var(--ps-teal);border-radius:10px;background:var(--ps-bg)}
.unit-board.photo-sheet .ps-grid{width:100%;border-collapse:separate;border-spacing:3px;table-layout:fixed;font-variant-numeric:tabular-nums}
.unit-board.photo-sheet .ps-grid th,.unit-board.photo-sheet .ps-grid td{padding:0;min-width:0}
.unit-board.photo-sheet .ps-grid tr>:first-child{width:40px}
.unit-board.photo-sheet .ps-grid thead th{position:sticky;top:0;z-index:2;background:var(--ps-bg);padding-top:3px}
.unit-board.photo-sheet .ps-grid tbody th{position:sticky;left:0;z-index:1;background:var(--ps-bg)}
.unit-board.photo-sheet .ps-corner{font-size:11px;font-weight:700;color:var(--ps-muted)}
.unit-board.photo-sheet .ps-head{width:100%;min-height:38px;padding:3px 2px;border:1px dashed #a9c4b9;border-radius:8px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15;font-size:12px;font-weight:800}
.unit-board.photo-sheet .ps-head small{font-size:10.5px;font-weight:800;color:var(--ps-teal)}
.unit-board.photo-sheet .ps-head:hover{border-style:solid;border-color:var(--ps-teal);background:var(--ps-soft)}
.unit-board.photo-sheet .ps-floor{min-height:42px;flex-direction:row;gap:1px}
.unit-board.photo-sheet .ps-floor small{color:var(--ps-muted);font-weight:600}
.unit-board.photo-sheet .ps-unit{width:100%;min-width:0;min-height:42px;padding:3px 2px;border:1px solid var(--ps-line);border-radius:8px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15;transition:background .12s,border-color .12s}
.unit-board.photo-sheet .ps-unit b{font-size:12.5px;font-weight:800;letter-spacing:-.3px}
.unit-board.photo-sheet .ps-unit small{font-size:10.5px;color:var(--ps-muted)}
.unit-board.photo-sheet button.ps-unit:hover{border-color:var(--ps-teal)}
.unit-board.photo-sheet .ps-unit.ps-on{background:var(--ps-teal);border-color:var(--ps-teal);color:#fff;box-shadow:inset 0 0 0 1px #ffffff40}
.unit-board.photo-sheet .ps-unit.ps-on small{color:#d6ebe3}
.unit-board.photo-sheet .ps-unit.ps-zero:not(.ps-on){background:#fbfaf7;color:#7d8a85}
.unit-board.photo-sheet .ps-unit-off{border-style:dashed;background:transparent;color:#a3ada9;cursor:default}
.unit-board.photo-sheet .ps-unit-off small{color:inherit}
.unit-board.photo-sheet .ps-empty{display:block;min-height:42px;border-radius:8px;background:repeating-linear-gradient(135deg,transparent 0 5px,#e9e3d8 5px 6px)}
.unit-board.photo-sheet .ps-cell-note{display:flex;align-items:center;justify-content:center;min-height:42px;font-size:11px;color:var(--ps-muted);text-align:center}
.unit-board.photo-sheet .ps-refuge td{background:#efe9dd;border-radius:8px}
.unit-board.photo-sheet .ps-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:4px}
.unit-board.photo-sheet .ps-extra{margin-top:8px}
.unit-board.photo-sheet .ps-extra p{grid-column:1/-1;margin:0;font-size:12px;color:var(--ps-muted)}
.unit-board.photo-sheet .ps-cats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.unit-board.photo-sheet .ps-cat,.unit-board.photo-sheet .ps-fmt{display:flex;align-items:center;gap:7px;min-width:0;min-height:40px;padding:6px 9px;border:1px solid var(--ps-line);border-radius:9px;background:#fff;cursor:pointer}
.unit-board.photo-sheet .ps-cat input,.unit-board.photo-sheet .ps-fmt input{flex:0 0 auto;width:18px;height:18px;margin:0;accent-color:var(--ps-teal)}
.unit-board.photo-sheet .ps-cat span{flex:1 1 auto;min-width:0;font-weight:700;overflow-wrap:anywhere}
.unit-board.photo-sheet .ps-cat small{font-size:11px;color:var(--ps-muted);font-variant-numeric:tabular-nums}
.unit-board.photo-sheet .ps-cat.ps-on,.unit-board.photo-sheet .ps-fmt.ps-on{border-color:var(--ps-teal);background:var(--ps-soft)}
.unit-board.photo-sheet .ps-formats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}
.unit-board.photo-sheet .ps-fmt span{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.unit-board.photo-sheet .ps-fmt small{font-size:11px;color:var(--ps-muted)}
.unit-board.photo-sheet .ps-summary{position:sticky;bottom:0;z-index:3;margin:0 0 4px;padding:10px 12px;border-radius:12px;background:var(--ps-ink);color:#fff;box-shadow:0 -6px 16px #1e383226}
.unit-board.photo-sheet .ps-stats{display:flex;flex-wrap:wrap;gap:4px 16px;align-items:baseline}
.unit-board.photo-sheet .ps-stats span{font-size:12px;color:#cfe1da}
.unit-board.photo-sheet .ps-stats b{margin-right:3px;font-size:20px;font-weight:800;color:#fff;font-variant-numeric:tabular-nums}
.unit-board.photo-sheet .ps-hint,.unit-board.photo-sheet .ps-warn{margin:6px 0 0;font-size:12px;color:#cfe1da}
.unit-board.photo-sheet .ps-warn{padding:6px 9px;border-radius:8px;background:#fbe4d9;color:#7d3b1e;font-weight:700}
.unit-board.photo-sheet .ps-progress{margin:8px 0 0}
.unit-board.photo-sheet .ps-progress p{margin:6px 0 0;font-size:12px;color:var(--ps-muted)}
.unit-board.photo-sheet .ps-bar{height:8px;border-radius:999px;background:#e7e2d8;overflow:hidden}
.unit-board.photo-sheet .ps-bar i{display:block;height:100%;width:0;border-radius:inherit;background:var(--ps-teal);transition:width .2s}
@media (max-width:420px){
  .unit-board.photo-sheet .ps-section{padding:8px 8px 10px}
  .unit-board.photo-sheet .ps-grid{border-spacing:2px}
  .unit-board.photo-sheet .ps-grid tr>:first-child{width:30px}
  .unit-board.photo-sheet .ps-unit b{font-size:11.5px;letter-spacing:-.5px}
  .unit-board.photo-sheet .ps-unit small,.unit-board.photo-sheet .ps-head small{font-size:9.5px}
  .unit-board.photo-sheet .ps-cats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .unit-board.photo-sheet .ps-formats{grid-template-columns:1fr}
}
.unit-board.photo-sheet .ps-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
