/* Option 5: one quiet workspace, visual grid or compact contact table. */
body.wireframe-shell {
  --wire-accent: #b94d00;
  /* Selected buttons: the same orange in light and dark mode, dark text. */
  --wire-fill: #ff9b4a;
  --wire-on-fill: #171717;
  --wire-tint: #fff1e5;
  --wire-ink: #202020;
  --bg: #f7f7f8;
  /* Side menu follows the theme: white in light mode, black in dark mode. */
  --wire-rail-bg: #ffffff;
  --wire-rail-edge: #e2e2e6;
  --wire-rail-text: #202020;
  --wire-rail-strong: #111111;
  --wire-rail-muted: #5f5f66;
  --wire-rail-line: #e2e2e6;
  --wire-rail-hover: #f2f2f4;
  --wire-rail-btn: #f2f2f4;
  --wire-rail-btn-line: #d4d4d9;
  --wire-chip-bg: #ececef;
  --wire-chip-text: #202020;
}
body.wireframe-shell.dark-mode {
  --wire-tint: #1f1f1f;
  --bg: #000000;
  --wire-rail-bg: #000000;
  --wire-rail-edge: #2a2a2a;
  --wire-rail-text: #eeeeee;
  --wire-rail-strong: #ffffff;
  --wire-rail-muted: #dddddd;
  --wire-rail-line: #4c4c4c;
  --wire-rail-hover: #1f1f1f;
  --wire-rail-btn: #1a1a1a;
  --wire-rail-btn-line: #555555;
  --wire-chip-bg: #1a1a1a;
  --wire-chip-text: #ffffff;
}
.wireframe-shell .nav16-rail {
  background: var(--wire-rail-bg);
  border: 0;
  border-right: 1px solid var(--wire-rail-edge);
  padding: 24px 14px;
  gap: 7px;
}
.wireframe-shell .nav16-brand {
  color: var(--wire-rail-strong);
  font-family: Georgia, serif;
  font-size: 19px;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.wireframe-shell .nav16-top {
  margin-bottom: 25px;
}
.wireframe-shell .nav16-item,
.wireframe-shell .nav16-toggle {
  color: var(--wire-rail-text);
}
.wireframe-shell .nav16-toggle {
  border-color: var(--wire-rail-line);
}
.wireframe-shell .nav16-item:hover {
  background: var(--wire-rail-hover);
}
.wireframe-shell .nav16-item[aria-current="page"] {
  background: var(--wire-fill);
  color: var(--wire-on-fill);
}
.wireframe-shell .nav16-add {
  background: var(--wire-fill);
  color: var(--wire-on-fill);
  border: 0;
}
.wireframe-shell .nav16-item {
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
}
.wireframe-shell .nav16-dd-menu {
  color: var(--text);
}
.wireframe-shell .header {
  background: var(--card-bg);
  color: var(--text);
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
}
.wireframe-shell .header-top {
  min-height: 44px;
  align-items: center;
  gap: 16px;
}
.wireframe-shell .header-brand {
  display: block;
  font-family: var(--font);
  font-size: clamp(15px, 2vw, 22px);
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 4px 0;
  min-height: 44px;
  text-align: left;
  cursor: pointer;
}
.wireframe-shell .header-brand:focus-visible {
  outline: 2px solid var(--wire-accent);
  outline-offset: 4px;
}
.wireframe-title {
  margin: 0 0 4px;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.wireframe-shell .header-subtitle {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.wireframe-shell .header-sync {
  font-size: 11px;
  color: var(--text-muted);
}
.wireframe-shell .header .header-user-logout {
  color: var(--text-secondary);
}
.wireframe-shell .header .header-user {
  color: var(--text-secondary);
}
.wireframe-shell .header-overflow .tools-toggle-btn {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.wireframe-shell #controlRow {
  padding: 16px 28px 8px;
  gap: 12px;
  background: var(--card-bg);
}
.wireframe-shell #controlRow .search-box {
  max-width: 560px;
}
.wireframe-shell #searchInput {
  border-radius: 6px;
  min-height: 44px;
  background: var(--bg);
}
.wireframe-shell #menuBar {
  padding: 4px 28px 8px;
  background: var(--card-bg);
  gap: 8px;
}
.wireframe-shell .menu-groups {
  gap: 6px;
}
.wireframe-shell .menu-group-btn {
  border: 0;
  font-size: 12px;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 5px;
}
.wireframe-shell .adaptive-toolbar {
  background: var(--card-bg);
  padding: 8px 28px 14px;
  gap: 16px;
}
.wireframe-shell .view-switcher {
  gap: 0;
  padding: 3px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 7px;
}
.wireframe-shell .view-switcher .view-btn {
  min-width: 64px;
  min-height: 38px;
  border: 0;
  border-radius: 5px;
}
.wireframe-shell .view-switcher .view-btn.active {
  color: var(--wire-on-fill);
  background: var(--wire-fill);
}
.wireframe-density {
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px;
  background: var(--bg);
}
.wireframe-density button {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}
.wireframe-density button[aria-pressed="true"] {
  background: var(--wire-tint);
  color: var(--text);
  box-shadow: inset 0 0 0 1px #f5ba85;
}
.wireframe-shell .browse-density {
  display: none;
}
.wireframe-shell .primary-toolbar-wrap {
  background: var(--card-bg);
}
.wireframe-shell #deskRow {
  padding: 10px 28px;
}
.wireframe-shell .quick-chip,
.wireframe-shell .followups-due-chip,
.wireframe-shell .active-filter-chip {
  border-radius: 5px;
  font-size: 11px;
}
.wireframe-shell .active-filter-chip {
  background: var(--wire-tint);
  border-color: #f5c49e;
}
.wireframe-shell .active-filter-clear {
  background: transparent;
  color: var(--text);
  border: 0;
}
.wireframe-shell #whereLine {
  padding: 14px 28px 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.wireframe-shell #contactsContainer {
  padding: 8px 28px 32px;
}
.wireframe-shell #contactsContainer.grid-view:not(.list-view) {
  --browse-card-min: 220px;
  --browse-gap: 18px;
}
.wireframe-shell #contactsContainer.grid-view .card {
  border-radius: 7px;
  background: var(--card-bg);
}
.wireframe-shell .browse-card-heading {
  padding: 12px 14px 6px;
}
.wireframe-shell .card-name {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.wireframe-shell .card-strip {
  background: transparent;
  border: 0;
}
.wireframe-shell .card-strip-rating {
  color: var(--wire-accent);
}
.wireframe-shell .otw-check-label {
  color: var(--text);
}
.wireframe-shell input[type="checkbox"] {
  accent-color: var(--wire-accent);
}
.wireframe-shell #slideoutPanel {
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 30px #00000008;
}
.wireframe-shell .slideout-header {
  background: var(--card-bg);
}
.wireframe-shell .nav16-tabbar {
  background: var(--card-bg);
}
.wireframe-shell .nav16-tabbar [aria-current="page"] {
  color: var(--wire-accent);
}
.wireframe-shell .nav16-plus {
  background: var(--wire-fill);
  color: var(--wire-on-fill);
}
.wireframe-shell :focus-visible {
  outline: 2px solid var(--wire-accent);
  outline-offset: 3px;
}
@media (min-width: 768px) {
  .wireframe-shell #contactsContainer.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .contact-list-item.list-row-015 {
    display: grid;
    grid-template-columns:
      34px 48px minmax(100px, 1.1fr) minmax(110px, 1.3fr)
      64px 56px 44px;
    align-items: center;
    gap: 0 12px;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    min-height: 80px;
    background: var(--card-bg);
  }
  .wireframe-shell[data-browse-density="compact"]
    #contactsContainer.list-view
    .contact-list-item.list-row-015 {
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: 64px;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    > .contact-checkbox-hit {
    grid-column: 1;
    grid-row: 1;
    min-width: 32px;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    > :is(.list-photo-wrap, .list-photo-placeholder) {
    grid-column: 2;
    grid-row: 1;
    width: 44px;
    height: 52px;
    min-height: 0;
    align-self: center;
    border-radius: 5px;
    overflow: hidden;
  }
  .wireframe-shell #contactsContainer.list-view .list-row-015 .list-photo {
    width: 44px;
    height: 52px;
    object-fit: cover;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    .list-photo-placeholder {
    font-size: 8px;
  }
  .wireframe-shell #contactsContainer.list-view .list-row-015 > .list-info {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
  }
  .wireframe-shell #contactsContainer.list-view .list-row-015 .list-name-line {
    display: block;
  }
  .wireframe-shell #contactsContainer.list-view .list-row-015 .list-name {
    font-size: 13px;
    min-height: 44px;
    white-space: normal;
    line-height: 1.3;
    text-align: left;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    > .browse-list-email {
    grid-column: 4;
    grid-row: 1;
    font-size: 12px;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    > .otw-check-label {
    grid-column: 5;
    grid-row: 1;
    font-size: 10px;
    min-height: 44px;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    > .list-status-boxes {
    grid-column: 6;
    grid-row: 1;
    display: flex;
    width: 48px;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    .list-status-box[data-action="set-rating"] {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    color: var(--wire-accent);
    background: var(--wire-tint);
    border: 0;
    border-radius: 5px;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    > .list-thumb-btn {
    grid-column: 7;
    grid-row: 1;
    width: 44px;
    min-width: 44px;
    height: 44px;
    background: transparent;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    > .list-row-actions {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .list-row-015
    :is(
      .list-meta,
      .list-last-contact,
      .list-headline,
      .profile-added,
      .t19-row-extras,
      .model-card-line,
      .list-info > .t17-edit,
      .list-name-line > .t17-edit
    ) {
    display: none;
  }
  .wireframe-shell .wireframe-list-heading {
    display: grid;
    grid-template-columns:
      34px 48px minmax(100px, 1.1fr) minmax(110px, 1.3fr)
      64px 56px 44px;
    gap: 12px;
    padding: 13px 44px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
  }
  .wireframe-shell .wireframe-list-heading[hidden] {
    display: none;
  }
}
@media (min-width: 768px) and (max-width: 1050px) {
  .wireframe-shell
    #contactsContainer.list-view
    .contact-list-item.list-row-015 {
    grid-template-columns:
      30px 40px minmax(80px, 1fr) minmax(90px, 1fr)
      56px 44px 36px;
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .wireframe-shell #contactsContainer {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (min-width: 768px) {
  .wireframe-shell.split-open
    #contactsContainer.list-view
    .contact-list-item.list-row-015 {
    grid-template-columns: 30px 40px minmax(100px, 1fr) 48px 44px;
    gap: 6px;
  }
  .wireframe-shell.split-open
    #contactsContainer.list-view
    .list-row-015
    > .browse-list-email {
    grid-column: 3;
    grid-row: 2;
  }
  .wireframe-shell.split-open
    #contactsContainer.list-view
    .list-row-015
    > .otw-check-label {
    grid-column: 4;
    grid-row: 1;
  }
  .wireframe-shell.split-open
    #contactsContainer.list-view
    .list-row-015
    > .list-status-boxes {
    grid-column: 4;
    grid-row: 2;
  }
  .wireframe-shell.split-open
    #contactsContainer.list-view
    .list-row-015
    > .list-thumb-btn {
    grid-column: 5;
    grid-row: 1/3;
  }
  .wireframe-shell.split-open
    #contactsContainer.list-view
    .list-row-015
    > .list-row-actions {
    grid-row: 3;
  }
  .wireframe-shell.split-open .wireframe-list-heading {
    display: none;
  }
}
@media (max-width: 767px) {
  .wireframe-shell .header {
    padding: 16px;
  }
  .wireframe-shell .header-top > div:first-child {
    flex-basis: auto;
  }
  .wireframe-title {
    font-size: 21px;
  }
  .wireframe-shell .header-sync {
    font-size: 10px;
  }
  .wireframe-shell #controlRow,
  .wireframe-shell #menuBar,
  .wireframe-shell .adaptive-toolbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .wireframe-shell .adaptive-toolbar {
    gap: 8px;
  }
  .wireframe-shell .adaptive-toolbar .sort-control {
    flex: 1 1 100%;
  }
  .wireframe-shell .header-stats {
    font-size: 10px;
  }
  .wireframe-shell #deskRow {
    padding: 8px 12px;
  }
  .wireframe-shell #contactsContainer {
    padding: 6px 12px 90px;
  }
  .wireframe-shell #whereLine {
    padding: 10px 12px;
  }
  .wireframe-list-heading {
    display: none;
  }
  .wireframe-shell #contactsContainer.list-view .contact-list-item {
    position: relative;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .contact-list-item
    > .browse-list-email {
    grid-column: 1/-1;
    font-size: 12px;
    padding: 0 8px;
  }
  .wireframe-shell
    #contactsContainer.list-view
    .contact-list-item
    > .otw-check-label {
    grid-column: 1/-1;
    padding: 0 8px;
  }
}
.wireframe-nav-toggle,
.wireframe-nav-close {
  display: none;
}
.wireframe-shell .header-top {
  flex-wrap: wrap;
}
.wireframe-shell .wireframe-title {
  margin-right: auto;
}
.wireframe-shell .header-top > div:first-of-type {
  display: none;
}
.wireframe-shell #addContactBtn {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--wire-fill);
  color: var(--wire-on-fill);
  padding: 0 16px;
}
.wireframe-shell #controlRow .sort-control {
  flex: 0 1 230px;
}
.wireframe-shell #controlRow .filter-btn {
  border-radius: 6px;
  background: var(--wire-tint);
  border: 1px solid #f5c49e;
}
@media (max-width: 1023px) {
  .wireframe-nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 12px;
  }
  .wireframe-shell.wireframe-nav-open #nav16Rail {
    display: flex;
    width: min(280px, 90vw);
    z-index: 2000;
    box-shadow: 0 0 0 100vmax #0008;
  }
  .wireframe-shell.wireframe-nav-open .nav16-brand,
  .wireframe-shell.wireframe-nav-open .nav16-t {
    display: inline;
  }
  .wireframe-shell.wireframe-nav-open .wireframe-nav-close {
    display: block;
    min-height: 44px;
    background: var(--wire-rail-btn);
    color: var(--wire-rail-strong);
    border: 1px solid var(--wire-rail-btn-line);
    border-radius: 6px;
  }
  .wireframe-shell.wireframe-nav-open .nav16-menu {
    left: 8px;
    top: 180px;
    max-width: calc(100vw - 16px);
  }
  .wireframe-shell #controlRow .sort-control {
    flex: 1 1 180px;
  }
  .wireframe-shell #addContactBtn {
    padding: 0 10px;
    font-size: 12px;
  }
}
.wireframe-shell .header-top {
  padding: 0;
}
.wireframe-shell #headerOverflow {
  display: none;
}
.wireframe-shell .nav16-add {
  display: none;
}
.wireframe-shell #nav16Rail .header-user {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  color: var(--wire-rail-muted);
}
.wireframe-shell #nav16Rail .header-user-logout {
  color: var(--wire-rail-strong);
  background: var(--wire-rail-btn);
  min-height: 44px;
  border: 1px solid var(--wire-rail-btn-line);
  border-radius: 5px;
}
.wireframe-secondary {
  margin: 0;
  padding: 8px 28px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.wireframe-secondary summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
}
.wireframe-secondary[open] {
  padding-bottom: 12px;
}
.wireframe-secondary #deskRow {
  padding: 8px 0;
}
@media (min-width: 768px) {
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    .list-name-line {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    .list-name {
    flex: 1;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    .t17-edit-btn {
    flex: 0 0 24px;
    min-width: 24px;
    width: 24px;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > :is(.list-photo-wrap, .list-photo-placeholder),
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    .list-photo {
    width: 44px;
    height: 52px;
    min-height: 0;
  }
  body.wireframe-shell.split-open[data-browse-density]
    #contactsContainer.list-view
    .contact-list-item.list-row-015 {
    grid-template-columns: 30px 44px minmax(100px, 1fr) 44px 44px 40px;
    grid-template-rows: auto auto;
  }
  body.wireframe-shell.split-open[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > :is(.list-photo-wrap, .list-photo-placeholder) {
    grid-row: 1/3;
  }
  body.wireframe-shell.split-open[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .otw-check-label {
    grid-column: 4;
    grid-row: 1/3;
  }
  body.wireframe-shell.split-open[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .list-status-boxes {
    grid-column: 5;
    grid-row: 1/3;
    display: flex;
    width: 44px;
  }
  body.wireframe-shell.split-open[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .list-thumb-btn {
    grid-column: 6;
    grid-row: 1/3;
  }
}
@media (max-width: 767px) {
  .wireframe-shell .header {
    padding: 12px;
  }
  .wireframe-shell .header-top {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .wireframe-shell .wireframe-title {
    font-size: 18px;
  }
  .wireframe-secondary {
    padding: 0 12px;
  }
  .wireframe-shell #deskRow {
    padding: 6px 12px;
  }
  .wireframe-shell #headerStats {
    flex-basis: 100%;
    margin-left: 0;
  }
  .wireframe-shell .adaptive-toolbar {
    padding-bottom: 8px;
  }
}
body.wireframe-shell.menus-wide #advFiltersToggle {
  display: inline-flex !important;
}
.wireframe-shell .wireframe-secondary {
  padding: 0;
  border: 0;
}
.wireframe-shell .wireframe-secondary[open] {
  flex-basis: 100%;
  width: 100%;
}
.wireframe-shell .wireframe-secondary #menuBar {
  padding: 8px 0;
}
.wireframe-shell .wireframe-secondary #statusOverviewStrip {
  padding: 8px 0;
}
.wireframe-shell #deskRow {
  min-height: 0;
}
.wireframe-shell #contactsContainer.list-view {
  gap: 0 !important;
}
.wireframe-shell #headerStats {
  margin-left: auto;
}
@media (max-width: 767px) {
  .wireframe-shell .adaptive-toolbar {
    gap: 6px;
  }
  .wireframe-shell .adaptive-toolbar .browse-backups {
    padding: 0;
  }
  .wireframe-shell #headerStats {
    flex-basis: auto;
    font-size: 10px;
  }
  .wireframe-shell .wireframe-density button {
    padding: 0 10px;
  }
}
/* Reused legacy tool controls remain accessible inside the secondary disclosure. */
body.wireframe-shell .wireframe-secondary #headerOverflow {
  display: block;
  position: relative;
}
body.wireframe-shell .wireframe-secondary #toolsToggle {
  display: inline-flex;
}
body.wireframe-shell .wireframe-secondary #toolsPanel {
  display: none;
  position: static;
  max-height: none;
  width: 100%;
  max-width: none;
}
body.wireframe-shell .wireframe-secondary #toolsPanel.open {
  display: block;
}
body.wireframe-shell .adaptive-toolbar #headerSync {
  display: flex;
  flex: 0 1 auto;
}
body.wireframe-shell.dark-mode {
  --wire-accent: #ff9b4a;
}
body.wireframe-shell.dark-mode
  :is(
    .view-switcher .view-btn.active,
    #addContactBtn,
    .nav16-item[aria-current="page"],
    .nav16-plus
  ) {
  color: #171717;
}
body.wireframe-shell .wireframe-density button,
body.wireframe-shell .view-switcher .view-btn {
  min-height: 44px;
}
body.wireframe-shell .wireframe-secondary #toolsToggle {
  display: inline-flex !important;
}
body.wireframe-shell .wireframe-secondary #toolsPanel.open {
  display: block !important;
}
body.wireframe-shell #controlRow .sort-control::after {
  display: none;
}
body.wireframe-shell #controlRow .sort-select {
  appearance: auto;
  -webkit-appearance: auto;
  width: 100%;
  min-width: 0;
}
@media (max-width: 767px) {
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .contact-list-item.list-row-015 {
    display: grid;
    grid-template-columns: 32px 48px minmax(0, 1fr) 44px;
    gap: 4px 8px;
    padding: 10px 8px;
    min-height: 144px;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .contact-checkbox-hit {
    grid-column: 1;
    grid-row: 1/3;
    min-width: 32px;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > :is(.list-photo-wrap, .list-photo-placeholder) {
    grid-column: 2;
    grid-row: 1/3;
    width: 48px;
    height: 64px;
    min-height: 0;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    .list-photo {
    width: 48px;
    height: 64px;
    object-fit: cover;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .list-info {
    grid-column: 3/5;
    grid-row: 1;
    min-width: 0;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    .list-name {
    font-size: 13px;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .browse-list-email {
    grid-column: 3/5;
    grid-row: 2;
    padding: 0;
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .otw-check-label {
    grid-column: 2/4;
    grid-row: 3;
    padding: 0;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .list-status-boxes {
    grid-column: 1;
    grid-row: 3;
    display: flex;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .list-thumb-btn {
    grid-column: 4;
    grid-row: 3;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--bg);
    color: var(--text);
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    > .list-row-actions {
    grid-column: 1/-1;
    grid-row: 4;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    :is(
      .list-meta,
      .list-last-contact,
      .list-headline,
      .profile-added,
      .t19-row-extras,
      .model-card-line,
      .list-info > .t17-edit,
      .list-name-line > .t17-edit
    ) {
    display: none;
  }
}
body.wireframe-shell .adaptive-toolbar #darkModeToggle {
  display: inline-flex !important;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
body.wireframe-shell #controlRow .sort-control {
  display: flex !important;
  align-items: center;
  min-width: 0;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 10px;
}
body.wireframe-shell #controlRow .sort-select {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  border: 0;
  height: 44px;
  padding: 0;
}
body.wireframe-shell #contactsContainer.list-view .list-photo {
  object-position: center top;
}
@media (max-width: 767px) {
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .contact-list-item.list-row-015 {
    grid-template-columns: 44px 48px minmax(0, 1fr) 44px;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    .list-photo-placeholder {
    width: 48px;
    height: 64px;
    min-height: 0;
    max-height: 64px;
    overflow: hidden;
    font-size: 9px;
  }
  body.wireframe-shell[data-browse-density]
    #contactsContainer.list-view
    .list-row-015
    .list-photo {
    max-height: 64px;
    object-position: center top;
  }
}
/* User controls stay inside both full and compact navigation rails. */
.wireframe-shell .wireframe-nav-footer,
.wireframe-shell .wireframe-nav-footer #headerUser {
  min-width: 0;
  width: 100%;
}
.wireframe-shell .wireframe-nav-footer #headerUser {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.wireframe-shell .wireframe-nav-footer #logoutBtn {
  box-sizing: border-box;
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 4px;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* One extra menu row still leaves logout on a short desktop window. */
@media (max-height: 800px) {
  .wireframe-shell .nav16-rail {
    gap: 2px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .wireframe-shell .nav16-top {
    margin-bottom: 8px;
  }
}
/* Keep the full original wordmark and both actions reachable on narrow screens. */
@media (max-width: 767px) {
  .wireframe-shell .header-top {
    flex-wrap: wrap;
  }
  .wireframe-shell .wireframe-title {
    flex: 1 0 100%;
    order: -1;
  }
  .wireframe-shell #addContactBtn {
    margin-left: auto;
  }
}

/* Shared header controls keep the original theme preference and list filter state. */
body.wireframe-shell .wireframe-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
body.wireframe-shell .header-top #darkModeToggle {
  display: inline-flex !important;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.wireframe-otw {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  background: var(--card-bg);
}
.wireframe-otw > span {
  font-size: 12px;
  padding: 0 6px;
}
.wireframe-otw button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.wireframe-otw button[aria-pressed="true"] {
  background: var(--wire-fill);
  color: var(--wire-on-fill);
}
.wireframe-otw button:focus-visible {
  outline: 2px solid var(--wire-accent);
  outline-offset: 2px;
}
@media (max-width: 767px) {
  body.wireframe-shell .wireframe-header-controls {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
}
body.wireframe-shell .header-top #darkModeToggle {
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
body.wireframe-shell .header-top #darkModeToggle:hover {
  color: var(--text);
  border-color: var(--wire-accent);
}
body.wireframe-shell .header-top #darkModeToggle:focus-visible {
  outline: 2px solid var(--wire-accent);
  outline-offset: 2px;
}
body.wireframe-shell.dark-mode .wireframe-otw button[aria-pressed="true"] {
  color: #171717;
}
/* Contact identity must wrap rather than clip when space or text scale changes. */
body.wireframe-shell[data-browse-density]
  #contactsContainer.list-view
  .list-row-015
  .list-name-line {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
body.wireframe-shell[data-browse-density]
  #contactsContainer.list-view
  .list-row-015
  .list-name {
  min-width: 0;
  width: auto;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
  height: auto;
}
body.wireframe-shell[data-browse-density]
  #contactsContainer.list-view
  .list-row-015
  > .browse-list-email {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
}
@media (max-width: 767px) {
  body.wireframe-shell .header-top {
    gap: 4px;
  }
}

/* The website wordmark uses Great Vibes initials and light Montserrat. */
@font-face {
  font-family: "Inspired Montserrat";
  src: url("../fonts/montserrat-light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inspired Great Vibes";
  src: url("../fonts/great-vibes.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
body.wireframe-shell .header-brand {
  font-family: "Inspired Montserrat", var(--font);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
  line-height: 1.85;
  padding: 0.15em 0.25em;
  overflow: visible;
}
body.wireframe-shell .header-brand .brand-initial {
  font-family: "Inspired Great Vibes", cursive;
  font-size: 1.2em;
  font-weight: 400;
  padding-inline: 0.08em;
}
/* Clear legacy fixed tracks and positional labels after moving the original sort. */
body.wireframe-shell #controlRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
body.wireframe-shell #controlRow .search-hero {
  flex: 1 1 260px;
  min-width: 0;
}
body.wireframe-shell #controlRow .sort-control {
  flex: 0 1 230px;
  min-width: min(100%, 200px);
  height: auto;
  min-height: 44px;
  box-sizing: border-box;
}
body.wireframe-shell #controlRow .sort-control-label {
  position: static;
  display: inline;
  flex: 0 0 auto;
  transform: none;
  width: auto;
}
body.wireframe-shell #controlRow .sort-select {
  position: static;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 0 4px;
}
/* Counts are a complete row, with sync metadata below the browsing controls. */
body.wireframe-shell .adaptive-toolbar #headerStats {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  order: 1;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  font-size: 12px;
  line-height: 1.5;
}
body.wireframe-shell #headerStats #countLine,
body.wireframe-shell #headerStats .count-line-rest {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
body.wireframe-shell #headerStats #countFilterSummary {
  display: none;
}
body.wireframe-shell #headerStats .count-show-all {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
body.wireframe-shell .adaptive-toolbar #headerSync {
  order: 2;
  flex: 1 1 100%;
  min-width: 0;
  gap: 6px 16px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}
body.wireframe-shell #headerSync > span {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 767px) {
  body.wireframe-shell #controlRow .search-hero {
    flex-basis: 100%;
  }
  body.wireframe-shell #controlRow .sort-control {
    flex: 1 1 200px;
  }
}
/* Empty rating sessions need readable text instead of the landscape photo tracks. */
.b16-rate-overlay .b16-body:has(.b16-empty) {
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.b16-rate-overlay .b16-rate-stage:has(.b16-empty) {
  display: flex;
  flex: 1 0 auto;
  min-width: 0;
  width: 100%;
}
.b16-rate-overlay .b16-empty {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px;
  overflow-wrap: anywhere;
}
.b16-rate-overlay .b16-body:has(.b16-empty) .b16-rate-nums,
.b16-rate-overlay .b16-body:has(.b16-empty) [data-act="delete"],
.b16-rate-overlay .b16-body:has(.b16-empty) [data-act="edit"],
.b16-rate-overlay .b16-body:has(.b16-empty) [data-act="redo"],
.b16-rate-overlay .b16-body:has(.b16-empty) [data-act="skip"],
.b16-rate-overlay .b16-body:has(.b16-empty) .b16-hint {
  display: none;
}

/* Grid details stay in a fixed reading order and wrap without clipping. */
.wireframe-shell .grid-card-details {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.wireframe-shell .grid-card-details > div {
  display: grid;
  grid-template-columns: minmax(72px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: start;
}
.wireframe-shell .grid-card-details dt {
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-size: 12px;
}
.wireframe-shell .grid-card-details dd {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
/* Without a footer, zoom remains a normal 44px header control. Its former
   absolute pseudo hit area must not cover the entire picture. */
.wireframe-shell #contactsContainer.grid-view .card-header > .b16-zoom {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
.wireframe-shell #contactsContainer.grid-view .card-header > .b16-zoom::before {
  content: none;
}

/* Keep the brand clear of display cutouts and reserve a stable top-right theme slot. */
body.wireframe-shell .header {
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
}
body.wireframe-shell #nav16Rail {
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
}
body.wireframe-shell .header-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}
body.wireframe-shell .wireframe-title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
}
body.wireframe-shell .header-brand {
  max-width: 100%;
  white-space: normal;
}
body.wireframe-shell .header-top > #darkModeToggle {
  display: inline-flex !important;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
}
body.wireframe-shell .wireframe-header-controls {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: flex-start;
  gap: 8px;
}
body.wireframe-shell #nav16Rail #addContactBtn {
  margin: 0;
  min-height: 44px;
  background: var(--wire-fill);
  color: var(--wire-on-fill);
}
body.wireframe-shell.dark-mode #nav16Rail #addContactBtn {
  color: #171717;
}
body.wireframe-shell #nav16Rail #addContactBtn[hidden],
body.wireframe-shell .nav16-plus[hidden] {
  display: none;
}
@media (min-width: 1024px) {
  body.wireframe-shell.nav16-icon #nav16Rail {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }
}

/* A single navigation/filter row keeps profiles higher without shrinking touch targets. */
@media (max-width: 1023px) {
  body.wireframe-shell .wireframe-header-controls {
    gap: 4px;
  }
  body.wireframe-shell .wireframe-header-controls .wireframe-nav-toggle {
    min-width: 44px;
    /* Match filter-label text instead of platform-dependent native button fonts. */
    font-size: 12px;
    padding: 0 4px;
    flex: 0 0 auto;
  }
  body.wireframe-shell .wireframe-header-controls .wireframe-otw {
    gap: 0;
    padding: 0;
  }
  body.wireframe-shell .wireframe-header-controls .wireframe-otw > span {
    padding: 0 2px;
  }
  body.wireframe-shell .wireframe-header-controls .wireframe-otw button {
    padding: 0;
    flex: 0 0 auto;
  }
}
@media (max-width: 359px) {
  body.wireframe-shell .wireframe-header-controls {
    gap: 1px;
  }
  body.wireframe-shell .wireframe-header-controls .wireframe-nav-toggle {
    padding: 0;
  }
  body.wireframe-shell .wireframe-header-controls .wireframe-otw > span {
    padding: 0 1px;
  }
}

/* Keep the release visible beneath the brand, including narrow screens and light mode. */
body.wireframe-shell .wireframe-title > .header-version {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 0 4px 5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--wire-chip-bg);
  color: var(--wire-chip-text);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.wireframe-cleanup-nav {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--wire-rail-line);
  padding-top: 8px;
  margin-block: 6px;
}
.wireframe-cleanup-nav[hidden] {
  display: none;
}
.wireframe-cleanup-nav .nav16-item {
  min-height: 44px;
}
.wireframe-cleanup-title {
  color: var(--wire-rail-muted);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}
@media (min-width: 1024px) {
  .nav16-icon .wireframe-cleanup-title {
    display: none;
  }
}

.applications-nav-count {
  margin-left: auto;
  min-width: 18px;
  border-radius: 999px;
  padding: 2px 4px;
  background: var(--wire-fill);
  color: var(--wire-on-fill);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.applications-nav-count[hidden] {
  display: none;
}
.nav16-icon #nav16Rail [data-nav16="applications"] {
  position: relative;
}
.nav16-icon #nav16Rail .applications-nav-count {
  position: absolute;
  right: 2px;
  top: 2px;
}
#applicationsInboxViews [aria-pressed="true"] {
  border-color: var(--accent);
  font-weight: 700;
}

/* Country and City quick filters beside the toggles (28 Nov 2026). */
.wireframe-places {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wireframe-place {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 0 0 2px;
  background: var(--card-bg);
}
.wireframe-place > span {
  font-size: 12px;
  padding: 0 6px;
  color: var(--text);
  white-space: nowrap;
}
.wireframe-place select {
  min-height: 44px;
  min-width: 0;
  max-width: 220px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 8px;
  cursor: pointer;
}
.wireframe-place select:focus-visible {
  outline: 2px solid var(--wire-accent);
  outline-offset: 2px;
}
/* A chosen place gets the selected-button orange edge. */
.wireframe-place.is-set {
  border-color: var(--wire-fill, var(--wire-accent));
  box-shadow: inset 0 0 0 1px var(--wire-fill, var(--wire-accent));
}
@media (max-width: 1023px) {
  /* 16px stops iPhone and iPad zooming in when a list opens. */
  .wireframe-place select {
    font-size: 16px;
  }
}
@media (max-width: 767px) {
  body.wireframe-shell .wireframe-header-controls .wireframe-places {
    flex: 1 1 100%;
  }
  .wireframe-places .wireframe-place {
    flex: 1 1 0;
  }
  .wireframe-place select {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }
}
