/* Panora Life — Unplug (js/unplug.js).
 *
 * Built on the family's shared pieces (.card, .btn, .chip, .stat, .segmented)
 * and drawn only with family tokens, so it follows the accent and dark mode.
 * The home tile's colour is the one fixed exception, like every other tile's.
 */
.dom-wins .tile[data-tile='unplug'] {
  --c1: #3f8fe0;
  --c2: #1d4f9a;
}

.screen.dom-unplug {
  padding: 20px 20px calc(32px + var(--tabbar-h));
}
.dom-unplug .up-card {
  margin-top: 12px;
}
.dom-unplug .up-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.dom-unplug .up-card .chiprow {
  margin-top: 10px;
}
.dom-unplug .up-card .btn + .btn {
  margin-top: 8px;
}
.dom-unplug .up-stats {
  margin: 6px 0 4px;
}
.dom-unplug .stat .l {
  font-size: 12.5px;
}
.dom-unplug .tiny {
  font-size: 12.5px;
  line-height: 1.45;
}
.dom-unplug .sectionlbl {
  margin: 14px 0 6px;
}
.dom-unplug .segmented {
  margin: 8px 0;
}
/* Seven goals and a suggested one wrap onto two rows (Plan 2, B4). */
.dom-unplug .segmented.up-goals {
  /* Four to a row: eight in one row left each 35px wide, too small for a thumb
     (review 2026-11-09, decision 0136). */
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.dom-unplug .segmented.up-goals > button {
  min-height: 44px;
}
.dom-unplug .segmented.up-goals .up-goal-sugg {
  grid-column: 1 / -1;
}
.dom-unplug .up-empty {
  margin: 6px 0 12px;
}

.dom-unplug .up-resume {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  border-color: var(--accent);
  background: var(--accent-wash, var(--surface));
}

/* The week: seven bars and the goal as a line. */
.dom-unplug .up-week {
  margin: 10px 0 4px;
}
.dom-unplug .up-plot,
.dom-unplug .up-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.dom-unplug .up-plot {
  position: relative;
  height: 88px;
  align-items: end;
}
.dom-unplug .up-dows {
  margin-top: 4px;
  text-align: center;
}
.dom-unplug .up-col {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
}
.dom-unplug .up-colbar {
  display: block;
  width: 100%;
  max-width: 26px;
  border-radius: 6px 6px 3px 3px;
  background: var(--ink-muted);
  opacity: 0.55;
}
.dom-unplug .up-col.under .up-colbar {
  background: var(--accent);
  opacity: 1;
}
.dom-unplug .up-col.none .up-colbar {
  height: 3px !important;
  opacity: 0.25;
}
.dom-unplug .up-dow {
  font-size: 11.5px;
  color: var(--ink-muted);
  height: 14px;
}
/* Each bar's number, just above it (Phase 5); room above the tallest. */
.dom-unplug .up-week {
  padding-top: 16px;
}
.dom-unplug .up-col {
  position: relative;
}
.dom-unplug .up-val {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.dom-unplug .up-avg {
  margin: 8px 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.dom-unplug .up-same {
  width: 100%;
  margin-bottom: 6px;
}
.dom-unplug .up-goalline {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1.5px dashed var(--edge-strong);
  pointer-events: none;
}

.dom-unplug .up-entry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.dom-unplug .up-entry label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-muted);
  min-width: 0;
}
.dom-unplug .up-entry input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--edge-strong);
  background: var(--surface);
}
.dom-unplug .up-instead .btn {
  margin-top: 8px;
}
.dom-unplug .up-instead .sectionlbl {
  margin-top: 0;
}

/* The pause and the phone-free timer: one calm column, centred. */
.screen.dom-unplug.up-full {
  text-align: center;
}
.dom-unplug.up-full > div {
  max-width: 420px;
  margin: 0 auto;
  min-height: calc(calc(100dvh / var(--tz, 1)) - 140px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}
.dom-unplug .up-kicker {
  color: var(--ink-muted);
  font-size: 15px;
  margin: 0;
}
.dom-unplug .up-big {
  font-size: 26px;
  line-height: 1.2;
  margin: 6px 0 0;
}
.dom-unplug .up-note {
  font-size: 15px;
  color: var(--ink-muted);
}
.dom-unplug .up-why {
  justify-content: center;
  margin: 10px 0;
}
.dom-unplug a.btn {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dom-unplug .up-breath {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 18px auto;
  display: grid;
  place-items: center;
}
.dom-unplug .up-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    var(--accent-hi, var(--accent)),
    var(--accent-lo, var(--accent))
  );
  opacity: 0.85;
  animation: up-breathe 8s ease-in-out infinite;
}
.dom-unplug .up-count {
  position: relative;
  font-size: 44px;
  font-weight: 650;
  color: var(--accent-ink, #fff);
  font-variant-numeric: tabular-nums;
}
@keyframes up-breathe {
  0%,
  100% {
    transform: scale(0.62);
  }
  50% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dom-unplug .up-orb {
    animation: none;
    transform: scale(0.85);
  }
}

.dom-unplug .up-done {
  width: 72px;
  height: 72px;
  margin: 0 auto 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: var(--accent);
  color: var(--accent-ink, #fff);
}
.dom-unplug .up-clock {
  font-size: 64px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.dom-unplug .up-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--edge);
  overflow: hidden;
}
.dom-unplug .up-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.9s linear;
}

/* The setup guide. */
.dom-unplug .chip.on {
  background: var(--accent);
  color: var(--accent-ink, #fff);
  border-color: var(--accent);
}
.dom-unplug .up-steps {
  padding-left: 22px;
  line-height: 1.5;
  font-size: 15px;
}
.dom-unplug .up-steps li {
  margin: 6px 0;
}
.dom-unplug .up-steps ol {
  padding-left: 20px;
}
.dom-unplug .up-urls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.dom-unplug .up-url {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--surface);
}
.dom-unplug .up-url-app {
  font-weight: 600;
  font-size: 14px;
}
.dom-unplug .up-url code {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-muted);
}
.dom-unplug .up-url .btn {
  width: auto;
  margin: 0;
}

/* A plan for one app (decision 0026). */
.up-plan-steps {
  margin: 8px 0;
  padding-left: 22px;
  display: grid;
  gap: 6px;
}
.up-plan-app {
  margin: 0;
}
.up-plan-clear {
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text, var(--accent));
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
}
