/* Phone layout: a title bar, one scrolling screen, a running-clock bar, and tabs. */

.m-shell { display: flex; flex-direction: column; height: 100%; height: 100dvh; background: var(--page); }

.m-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: calc(54px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.m-head > .btn-icon { margin-left: -10px; }
.m-title { flex: 1; min-width: 0; font-size: calc(19px * var(--fs)); font-weight: 700; letter-spacing: -0.01em; }
.m-sync { margin-right: 8px; }
.m-actions { display: flex; gap: 6px; }
.m-actions:not(:empty) { padding-right: 4px; }

/* The scrolling area, with the + button floating over its corner. */
.m-body { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; }
.m-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.m-screen { display: grid; align-content: start; gap: 18px; padding: 16px 14px 96px; }

.fab {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(11, 11, 11, 0.28);
}
.fab:active { background: var(--accent-hover); }

/* ---- running clock bar and tabs ----------------------------------------------- */

.m-timerbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--go-soft);
}
.m-timerbar-job { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; color: var(--text); font-weight: 650; }
.m-timerbar-job:hover { text-decoration: none; }
.m-timerbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-timerbar-time { font-size: calc(17px * var(--fs)); font-weight: 700; }

.m-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.m-tab {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 0 7px;
  color: var(--text-3);
  font-size: calc(11px * var(--fs));
  font-weight: 650;
}
.m-tab:hover { text-decoration: none; }
.m-tab.on { color: var(--accent-ink); }

/* ---- lists of jobs ------------------------------------------------------------ */

.m-date { font-size: calc(22px * var(--fs)); font-weight: 700; letter-spacing: -0.02em; }
.m-group { display: grid; gap: 8px; }
.m-group-title { padding-left: 2px; font-size: calc(12.5px * var(--fs)); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.m-note { padding: 18px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); text-align: center; color: var(--text-2); }
.m-more-link { justify-self: start; padding: 8px 2px; font-weight: 600; }
.m-agenda { display: grid; gap: 8px; }
.m-agenda .m-group + .m-group { margin-top: 10px; }

.m-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 12px 13px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--st);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: var(--text);
}
.m-card:hover { text-decoration: none; }
.m-card:active { background: var(--surface-2); }
.m-card-main { display: grid; flex: 1; gap: 1px; min-width: 0; }
.m-card-when { font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.m-card-title { font-size: calc(16.5px * var(--fs)); font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.m-card-sub { font-size: calc(14px * var(--fs)); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-card-side { display: flex; flex: none; align-items: center; gap: 4px; color: var(--text-3); }
.m-card.st-done .m-card-title, .m-card.st-cancelled .m-card-title { color: var(--text-2); }
.m-card.st-cancelled .m-card-title { text-decoration: line-through; }

.m-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.m-row:hover { text-decoration: none; }
.m-row > .icon { color: var(--text-3); }
.m-row-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.m-row-text { flex: 1; min-width: 0; }
.m-row-title { font-weight: 650; }
