/* Tampilan peta sambungan khusus ponsel. Desktop tetap memakai susunan 3 kolom. */
@media (max-width: 760px) {
  .splice-view {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .splice-header {
    position: sticky !important;
    top: 0;
    height: auto !important;
    min-height: 0;
    padding: 10px 12px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center !important;
  }

  .splice-title-group {
    min-width: 0;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px !important;
    align-items: center !important;
  }

  .splice-title-group #closeSplice {
    width: 42px;
    min-width: 42px !important;
    height: 42px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0;
  }

  .splice-title-group #closeSplice::before {
    content: "\2190";
    display: block;
    font-size: 22px;
    line-height: 40px;
  }

  .splice-title-group > div { min-width: 0; }
  .splice-title-group .eyebrow { font-size: 8px; letter-spacing: .12em; }
  .splice-title-group h2 {
    margin-top: 2px;
    max-width: 100%;
    font-size: 15px !important;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .splice-header > div:last-child {
    position: static !important;
    margin: 0 !important;
  }

  #addCable {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0;
  }

  #addCable::before {
    content: "+";
    display: block;
    font-size: 24px;
    line-height: 40px;
  }

  .splice-summary {
    margin: 10px 12px 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 6px !important;
  }

  .splice-summary .chip {
    padding: 6px 9px;
    font-size: 10px;
  }

  .splice-instruction {
    order: 20;
    flex: 1 0 100%;
    margin: 0 !important;
    padding: 8px 10px !important;
    font-size: 10px !important;
    line-height: 1.35;
  }

  .splice-board {
    width: auto !important;
    min-width: 0 !important;
    margin: 10px 12px 24px !important;
    padding: 10px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr) !important;
    gap: 3px !important;
    border-radius: 13px !important;
    overflow: visible;
  }

  .splice-column,
  .cable-stack,
  .splice-cable {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  .column-label {
    height: auto !important;
    min-height: 42px;
    margin-bottom: 7px;
    padding: 6px !important;
  }

  .column-label b { font-size: 8px; }
  .column-label span { display: none !important; }
  .cable-stack { gap: 10px; }
  .splice-cable { border-radius: 10px; box-shadow: 0 4px 12px rgba(20,57,78,.07); }

  .splice-cable-head {
    min-height: 42px;
    padding: 6px !important;
    gap: 3px;
  }

  .splice-cable-head b {
    min-width: 0;
    font-size: 8px !important;
    line-height: 1.25;
    white-space: normal;
  }

  .splice-cable-head button {
    flex: none;
    width: 25px;
    min-width: 25px;
    min-height: 28px;
    padding: 0 !important;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0 !important;
  }

  .splice-cable-head button::before { content: "\270E"; font-size: 13px; }

  .splice-row {
    height: 34px !important;
    grid-template-columns: 28px minmax(0, 1fr) 34px 25px !important;
    font-size: 8px !important;
  }

  .splice-row.has-note { height: 44px !important; }
  .splice-row .core-note { font-size: 6px; margin-top: 1px; }

  .splice-row .usage { padding: 0 4px; }
  .splice-row .status {
    max-width: 32px !important;
    padding: 3px 2px;
    font-size: 0;
  }

  .splice-row .status::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    margin: auto;
    border-radius: 50%;
    background: #a6b4bb;
  }

  .splice-row .status.AKTIF::before { background: #28a36f; }
  .splice-row .status.PUTUS::before,
  .splice-row .status.PERBAIKAN::before { background: #e04f57; }
  .splice-row .status.CADANGAN::before { background: #e3a92b; }

  .core-edit {
    min-width: 22px;
    min-height: 26px;
    margin-right: 2px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  .core-edit::before { content: "\270E"; font-size: 11px; }

  .splice-center {
    width: 52px;
    min-width: 52px;
    min-height: 100% !important;
    height: auto;
    background: linear-gradient(90deg,transparent 49%,#e2ebef 50%,transparent 51%) !important;
    display: block;
    border: 0;
  }

  .splice-center svg { display: block; overflow: visible; }
  .flow-label {
    position: relative;
    z-index: 2;
    margin: 13px 0 0 !important;
    padding: 4px 1px;
    border-radius: 7px;
    background: rgba(237,245,248,.94);
    color: #557585;
    font-size: 6px;
    line-height: 1.2;
    text-align: center;
  }

  .flow-label::before,
  .flow-label::after { content: none; }

  dialog {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px);
  }

  dialog form { padding: 16px !important; }
}
