/* Audit fixes. Loaded last so these win over earlier sheets. */

.phone.is-desk .desk-detail .nav-slot:not(.is-demo),
.phone.is-desk .desk-dialog .nav-slot:not(.is-demo) {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: auto;
  width: 56px;
  height: 56px;
  margin: 0;
  transform: none;
}
.phone .detail-new.has-nav .pad {
  padding-bottom: calc(var(--fab-clear) + env(safe-area-inset-bottom, 0px));
}

.map-pop {
  position: absolute;
  right: 16px;
  bottom: 80px;
  z-index: 8;
  min-width: 220px;
  max-width: calc(100% - 32px);
  padding: 8px;
  border-radius: 14px;
  background: var(--elevated);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.map-pop a, .map-pop button { min-height: 44px; justify-content: flex-start; text-decoration: none; }
.desk-dialog .map-pop { top: 60px; bottom: auto; }

.phone .board-lane > .now-line {
  left: -8px;
  width: 16px;
  z-index: 3;
}
.phone .board-lane > .now-line::after,
.week-col > .now-line::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.week-col > .now-line { width: 8px; left: 0; z-index: 3; }

.phone .board-card.is-title .ec-title strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone .v20-itin .dayblock h2 {
  position: sticky;
  top: calc(var(--chrome-h, 44px) + var(--cal-pin, 0px));
  z-index: 2;
  margin: 0;
  background: var(--grouped);
}
.is-desk .desk-pin {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--grouped);
}
.is-desk .v20-itin .dayblock h2 { top: var(--cal-pin, 88px); }

.desk-plans h2 {
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.desk-detail.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 32px 24px;
  color: var(--muted);
  text-align: center;
}
.desk-detail.is-empty p { margin: 0; max-width: 240px; }
.empty-ico { display: block; width: 40px; height: 40px; margin: 0 auto 12px; color: var(--accent-button); }

@media (hover: hover) {
  .phone .ec:hover,
  .phone .desk-row:hover,
  .phone .hit:hover,
  .phone .menu-list button:hover,
  .phone .v-card:hover,
  .phone .inbox-card:hover {
    background: var(--fill);
  }
}

.phone .menu-list button,
.phone .menu-list button span,
.phone .menu-list button strong,
.phone .hit,
.phone .hit strong,
.phone .modo-planes .menu-list button {
  text-align: left;
  justify-content: flex-start;
}
.phone .menu-list button strong { max-width: none; }

.phone .ec-photo,
.phone .photo-card img,
.phone .inbox-card img,
.phone article .hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 200px;
  height: auto;
  object-fit: cover;
}
.phone .ph-frame > img { aspect-ratio: 4 / 3; max-height: 292px; height: 220px; object-fit: cover; }

.weekgrid-wrap { overflow-x: auto; }
.week-head, .weekgrid { grid-template-columns: 40px repeat(7, minmax(128px, 1fr)); }
.week-col, .week-col .board-card { overflow: hidden; }
.week-col .ec-photo { display: none; }
.week-col .ec-title strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
}
.week-col .ec-meta, .week-col .ec-time { font-size: 11px; line-height: 1.2; }
.phone .week-h.is-on, .phone .week-h[aria-pressed="true"] {
  background: var(--fill);
  color: var(--ink);
  box-shadow: none;
}

.desk-b-bar { flex-wrap: wrap; align-items: center; }
.desk-b-bar .chev {
  width: 44px;
  min-width: 44px;
  padding: 0;
  background: transparent;
}
.desk-b-bar .seg { flex: 1 1 280px; min-width: 260px; }
.desk-b-bar .seg button {
  background: transparent;
  min-width: 0;
  padding: 0 8px;
  white-space: nowrap;
}
.desk-b-bar .desk-mode {
  margin-left: auto;
  background: transparent;
  color: var(--accent-button);
}
.desk-b-bar .desk-only-narrow { align-self: center; }

.desk-dialog > .icon-x,
.desk-list-x {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.desk-dialog > .icon-x { position: sticky; top: 8px; float: right; z-index: 4; margin: 8px; }

.desk { position: relative; }
@media (min-width: 1100px) {
  .desk-c { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(280px, 340px); }
}
@media (max-width: 1099px) {
  .desk-c.is-list::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 5;
  }
  .desk-c.is-list .desk-list { z-index: 6; }
  .desk-c .desk-topnav {
    flex-wrap: wrap;
    background: var(--grouped);
    border-bottom: 0;
    gap: 0 8px;
    position: relative;
    z-index: 2;
  }
  .desk-c .desk-topnav span { flex: 1 0 100%; font-weight: 700; padding: 0 12px 6px; }
  .phone .desk-topnav button {
    width: auto;
    flex: none;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
  }
  .phone .desk-topnav button[aria-selected="true"] {
    background: transparent;
    color: var(--accent-button);
    box-shadow: none;
    border-bottom-color: var(--accent-button);
  }
  .desk-compact {
    display: flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 8px;
    position: sticky; top: 0; z-index: 6; background: var(--grouped);
  }
  .desk-compact button[data-act="desk-mode"] {
    min-height: 32px; padding: 0 2px; border: 0; background: transparent;
    color: var(--muted); font: inherit; font-weight: 600;
    border-bottom: 2px solid transparent; border-radius: 0;
  }
  .desk-compact button[aria-selected="true"] {
    color: var(--accent-button); border-bottom-color: var(--accent-button); background: transparent;
  }
  .desk-compact .v20-tools { margin-left: auto; }
  .desk-a:has(.desk-compact) .desk-topnav { display: none; }
  .v20-a .icon-view, .v20-a .v20-menu { display: none; }
  .phone .v20-range { display: none; }
  .phone .v20-title { min-height: 44px; align-items: center; }
  .phone .v20-title h1 { font-size: 22px; }
  .phone .daystrip { padding: 0 4px 4px; flex-wrap: nowrap; }
  .phone .daystrip button { min-height: 36px; }
  .phone .v20-seg, .phone .v20-head .seg { margin: 0; }
  .phone .v20-head { padding-top: 0; padding-bottom: 0; }
}
@media (min-width: 800px) and (max-width: 1099px) {
  .v20-a .v20-seg { display: none; }
  .v20-a .icon-view { display: inline-flex; }
  .phone .daystrip button { min-height: 32px; }
  .phone .v20-title h1 { font-size: 22px; }
}
@media (max-width: 719px) {
  .desk-c.is-list::before { display: none; }
}

@media (min-width: 1100px) {
  .phone.opt-20a, .phone.opt-20b { width: min(720px, 100%); }
  .phone:not(.is-desk):not(.is-modo) .v20,
  .phone:not(.is-desk):not(.is-modo) article.pad {
    max-width: 720px;
  }
}

.phone .hist > span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.phone .hist .when {
  display: block;
  font-size: var(--footnote-size);
  font-weight: 400;
  color: var(--muted);
}
.phone .hist .when::before { content: "· "; }
.toast .btn-text { background: transparent; color: var(--accent-button); box-shadow: none; }

.roll-count { margin: 0 0 12px; color: var(--muted); }
.roll-count b {
  display: inline-block;
  color: var(--ink);
  animation: count-roll 420ms cubic-bezier(.25, 1, .5, 1);
}
@keyframes count-roll {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .roll-count b { animation: none; }
  .phone > canvas.snow { display: none; }
}

html[data-type="xl"] .phone .avatar { min-width: 28px; flex: none; }
html[data-type="xl"] .board-card.is-title .ec-title strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
