/*
 * Pactwise on Android, in Material 3 with Pactwise's palette.
 *
 * Colors are Material 3 color roles (--md-*), in the same lavender and violet
 * as the other apps. Each commitment's own color (--c) stays its accent.
 * The page draws edge to edge; the app tells it how much space the status bar,
 * notch and gesture bar take (--inset-*).
 */

:root {
	color-scheme: light;
	--inset-top: 0px;
	--inset-bottom: 0px;
	--inset-left: 0px;
	--inset-right: 0px;

	--md-primary: #6c5ce7;
	--md-onPrimary: #ffffff;
	--md-primaryContainer: #e4e0fd;
	--md-onPrimaryContainer: #20165e;
	--md-secondaryContainer: #ece9fd;
	--md-onSecondaryContainer: #2c2463;
	--md-tertiaryContainer: #fde2d3;
	--md-onTertiaryContainer: #3c1503;
	--md-surface: #f6f5fb;
	--md-surfaceContainerLowest: #ffffff;
	--md-surfaceContainerLow: #ffffff;
	--md-surfaceContainer: #f1effa;
	--md-surfaceContainerHigh: #ebe8f7;
	--md-surfaceContainerHighest: #e3dff3;
	--md-onSurface: #24223a;
	--md-onSurfaceVariant: #6c6987;
	--md-outline: #8e8aa8;
	--md-outlineVariant: #e0dcf0;
	--md-inverseSurface: #2c2a42;
	--md-inverseOnSurface: #f3f1fb;
	--md-inversePrimary: #c4bbff;
	--md-error: #ba1a1a;
	--md-errorContainer: #ffdad6;
	--md-onErrorContainer: #410002;
	--md-warning: #8a5300;
	--md-success: #2e6b2f;

	--md-elev-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
	--md-elev-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
	--md-elev-3: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15);
	--md-ease: cubic-bezier(0.2, 0, 0, 1);

	--navbar: 80px;
	--appbar: 64px;
}
html.m3-dark {
	color-scheme: dark;
	--md-primary: #8b7cf6;
	--md-onPrimary: #ffffff;
	--md-primaryContainer: #3a3170;
	--md-onPrimaryContainer: #e4e0fd;
	--md-secondaryContainer: #2e2850;
	--md-onSecondaryContainer: #e4e0fd;
	--md-tertiaryContainer: #5a2a12;
	--md-onTertiaryContainer: #fde2d3;
	--md-surface: #14121d;
	--md-surfaceContainerLowest: #0f0d17;
	--md-surfaceContainerLow: #1e1b2b;
	--md-surfaceContainer: #232033;
	--md-surfaceContainerHigh: #2a2639;
	--md-surfaceContainerHighest: #332f47;
	--md-onSurface: #eceaf6;
	--md-onSurfaceVariant: #a29ebb;
	--md-outline: #77728f;
	--md-outlineVariant: #332f47;
	--md-inverseSurface: #eceaf6;
	--md-inverseOnSurface: #24223a;
	--md-inversePrimary: #6c5ce7;
	--md-error: #ffb4ab;
	--md-errorContainer: #93000a;
	--md-onErrorContainer: #ffdad6;
	--md-warning: #ffb95c;
	--md-success: #8fd88a;
}

/* Pactwise's interface reads the --color-* variables: map them to the color roles */
:root,
html.m3-dark {
	--color-main-background: var(--md-surface);
	--color-main-background-blur: var(--md-surface);
	--color-background-hover: var(--md-surfaceContainerHigh);
	--color-main-text: var(--md-onSurface);
	--color-text-maxcontrast: var(--md-onSurfaceVariant);
	--color-border: var(--md-outlineVariant);
	--color-border-dark: var(--md-outline);
	--color-primary-element: var(--md-primary);
	--color-primary-element-hover: var(--md-primary);
	--color-primary-element-text: var(--md-onPrimary);
	--color-primary-element-light: var(--md-secondaryContainer);
	--color-primary-element-light-text: var(--md-onSecondaryContainer);
	--color-error: var(--md-error);
	--color-text-error: var(--md-error);
	--color-warning: var(--md-warning);
	--color-warning-text: var(--md-warning);
	--color-success-text: var(--md-success);
	--border-radius-element: 12px;
	--border-radius-large: 16px;
	--body-container-radius: 0;
}

/* --- base ---------------------------------------------------------------------------- */

html,
body.android {
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: var(--md-surface);
	color: var(--md-onSurface);
	font: 400 15px/1.45 Poppins, Roboto, system-ui, sans-serif;
	letter-spacing: 0.01em;
	-webkit-tap-highlight-color: transparent;
	-webkit-text-size-adjust: 100%;
	-webkit-user-select: none;
	user-select: none;
}
body.android input,
body.android textarea,
body.android .imp-editable {
	-webkit-user-select: text;
	user-select: text;
}
*,
*::before,
*::after {
	box-sizing: border-box;
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
a {
	color: inherit;
	text-decoration: none;
}
body.android #pactwise-app {
	--imp-line: var(--md-outlineVariant);
	--imp-muted: var(--md-onSurfaceVariant);
	--imp-bg: var(--md-surface);
	--imp-bg-soft: var(--md-surfaceContainerHigh);
	--imp-text: var(--md-onSurface);
	--imp-radius: 16px;
	height: 100%;
}
body.android,
body.android * {
	scrollbar-width: none;
}

/* Touch feedback: Material's state layer (darkens or lightens whatever is pressed) */
body.android :is(a, button, .imp-editable, summary, [role="button"]) {
	transition: box-shadow 0.15s var(--md-ease), background-color 0.2s var(--md-ease);
}
body.android :is(a, button, summary, [role="button"]):active:not(:disabled) {
	box-shadow: inset 0 0 0 100vmax color-mix(in srgb, currentColor 12%, transparent);
}
body.android :focus-visible {
	outline: 3px solid var(--md-primary);
	outline-offset: 2px;
}

/* --- layout: the page, the running timer, the tabs ----------------------------------- */

body.android .imp-layout {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 0;
	background: var(--md-surface);
}
body.android .imp-main {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--md-surface);
}
body.android .imp-page {
	max-width: 840px;
	margin: 0 auto;
	padding: 0 calc(16px + var(--inset-right)) 32px calc(16px + var(--inset-left));
}

/* A page's top bar: stays at the top while the page scrolls */
body.android .imp-pbar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 calc(-16px - var(--inset-right)) 4px calc(-16px - var(--inset-left));
	padding: calc(var(--inset-top) + 14px) calc(8px + var(--inset-right)) 10px calc(20px + var(--inset-left));
	background: var(--md-surface);
}
body.android .imp-pbar--back {
	padding-left: calc(4px + var(--inset-left));
}
body.android .imp-pbar__text {
	flex: 1 1 auto;
	min-width: 0;
}
body.android .imp-page .imp-pbar h1 {
	margin: 0;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
}
body.android .imp-page .imp-pbar--back h1 {
	font-size: 20px;
}
body.android .imp-pbar p {
	margin: 0;
	color: var(--md-onSurfaceVariant);
	font-size: 13px;
	font-weight: 600;
}
body.android .imp-pbar__actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 2px;
}
body.android :is(.imp-pbar__me, .imp-pbar__back) {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	color: var(--md-onSurface);
}
/* Pactwise's mark opens Settings and the account */
body.android .imp-pbar__me {
	width: 46px;
	height: 46px;
	margin-left: 4px;
	border-radius: 16px;
	background: #1e2a44;
}
html.m3-dark body.android .imp-pbar__me {
	background: var(--md-surfaceContainerHigh);
}
/* Nothing yet: the mark, large and quiet */
body.android .imp-empty--start {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 48px 24px;
	text-align: center;
}
body.android .imp-empty__logo {
	display: grid;
	place-items: center;
	width: 116px;
	height: 116px;
	border-radius: 36px;
	background: #1e2a44;
}
html.m3-dark body.android .imp-empty__logo {
	background: var(--md-surfaceContainerLow);
}
body.android .imp-page .imp-empty--start h2 {
	color: var(--md-onSurface);
	margin: 4px 0 0;
	font-size: 22px;
	font-weight: 800;
}
body.android .imp-empty--start p {
	margin: 0;
	color: var(--md-onSurfaceVariant);
	line-height: 1.55;
}

/* The running timer on the other tabs, above the tabs */
body.android .imp-mini {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	margin: 6px calc(12px + var(--inset-right)) 8px calc(12px + var(--inset-left));
	padding: 0 6px 0 16px;
	border-radius: 18px;
	background: var(--c);
	color: var(--on-c);
	box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 30%, transparent);
}
body.android .imp-mini__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	color: inherit;
}
body.android .imp-mini__name {
	overflow: hidden;
	font-size: 12px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
	opacity: 0.92;
}
body.android .imp-mini__clock {
	font-size: 18px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
body.android .imp-mini__stop {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border: none;
	border-radius: 22px;
	background: #ffffff;
	color: #24223a;
	font-size: 14px;
	font-weight: 700;
}

/* The tabs */
body.android .imp-tabbar {
	flex: 0 0 auto;
	height: calc(var(--navbar) + var(--inset-bottom));
	padding: 12px calc(4px + var(--inset-right)) var(--inset-bottom) calc(4px + var(--inset-left));
	border-radius: 24px 24px 0 0;
	background: var(--md-surfaceContainerLow);
	box-shadow: 0 -6px 24px rgba(60, 50, 140, 0.08);
}
body.android .imp-tabbar ul {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	margin: 0;
	padding: 0;
	list-style: none;
}
body.android .imp-tabbar a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.3px;
}
body.android .imp-tabbar a:active:not(:disabled) {
	box-shadow: none;
}
body.android .imp-tab__ind {
	display: grid;
	place-items: center;
	width: 60px;
	height: 32px;
	border-radius: 16px;
	transition: background-color 0.2s var(--md-ease);
}
body.android .imp-tabbar a:active .imp-tab__ind {
	background: color-mix(in srgb, var(--md-onSurface) 10%, transparent);
}
body.android .imp-tabbar a.active {
	color: var(--md-onSurface);
	font-weight: 700;
}
body.android .imp-tabbar a.active .imp-tab__ind {
	background: var(--md-secondaryContainer);
	color: var(--md-onSecondaryContainer);
}
body.android .imp-tab__label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* --- type ---------------------------------------------------------------------------- */

body.android .imp-page h1 {
	margin: 12px 0 16px;
	font-size: 28px;
	font-weight: 800;
	line-height: 36px;
	letter-spacing: 0;
}
body.android .imp-page h2 {
	margin: 24px 0 12px;
	font-size: 17px;
	font-weight: 800;
	line-height: 24px;
	letter-spacing: 0.15px;
}
/* at the top of a card, a heading needs no space above */
body.android :is(.imp-cpage__section, .imp-settings__section, .imp-hours, .imp-inblock, .imp-others, .imp-day) h2 {
	margin-top: 0;
}
body.android .imp-page h3 {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.1px;
}
body.android .imp-muted,
body.android .imp-note {
	color: var(--md-onSurfaceVariant);
}

/* --- buttons --------------------------------------------------------------------------- */

/* Tonal button */
body.android .imp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	height: auto;
	padding: 0 20px;
	border: none;
	border-radius: 14px;
	background: var(--md-surfaceContainer);
	color: var(--md-onSurface);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.1px;
	box-shadow: none;
}
body.android .imp-button:disabled {
	color: color-mix(in srgb, var(--md-onSurface) 38%, transparent);
}
/* Filled button */
body.android .imp-button--primary {
	border-color: transparent;
	background: var(--md-primary);
	color: var(--md-onPrimary);
}
body.android .imp-button--primary:disabled {
	background: color-mix(in srgb, var(--md-onSurface) 12%, transparent);
}
/* Icon buttons */
body.android .imp-icon-btn {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0;
	border: none;
	border-radius: 20px;
	background: transparent;
	color: var(--md-onSurfaceVariant);
	font-size: 18px;
}
/* Play / stop: floating action buttons in the commitment's color */
body.android .imp-play {
	width: 56px;
	height: 56px;
	border: none;
	border-radius: 16px;
	box-shadow: var(--md-elev-3);
}
body.android .imp-play:active {
	box-shadow: var(--md-elev-1), inset 0 0 0 100vmax rgba(255, 255, 255, 0.16);
}

/* Segmented buttons (Day / Week / Month …) */
body.android .imp-segmented {
	display: inline-flex;
	gap: 0;
	padding: 0;
	border: 1px solid var(--md-outline);
	border-radius: 20px;
	background: transparent;
	overflow: hidden;
}
body.android .imp-segmented button {
	min-height: 40px;
	margin: 0;
	padding: 0 16px;
	border: none;
	border-left: 1px solid var(--md-outline);
	border-radius: 0;
	background: transparent;
	color: var(--md-onSurface);
	font-size: 14px;
	font-weight: 500;
	box-shadow: none;
}
body.android .imp-segmented button:first-child {
	border-left: none;
}
body.android .imp-segmented button.active,
body.android .imp-segmented button[aria-pressed="true"],
body.android .imp-segmented button[aria-selected="true"] {
	background: var(--md-secondaryContainer);
	color: var(--md-onSecondaryContainer);
}

/* Tabs (commitments on the Tasks page): Material primary tabs */
body.android .imp-tabs {
	display: flex;
	gap: 0;
	margin: 0 -16px 8px;
	padding: 0 8px;
	overflow-x: auto;
	border-bottom: 1px solid var(--md-surfaceContainerHighest);
	flex-wrap: nowrap;
}
body.android .imp-tabs button {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	margin: 0;
	padding: 0 16px;
	border: none;
	border-radius: 0;
	background: transparent;
	color: var(--md-onSurfaceVariant);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.1px;
	box-shadow: none;
}
body.android .imp-tabs button.active,
body.android .imp-tabs button[aria-selected="true"] {
	color: var(--md-primary);
	border: none;
}
body.android .imp-tabs button.active::after,
body.android .imp-tabs button[aria-selected="true"]::after {
	content: "";
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 0;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--c, var(--md-primary));
}

/* --- cards ------------------------------------------------------------------------------ */

body.android :is(.imp-timer, .imp-day, .imp-inblock, .imp-others, .imp-warning, .imp-cpage__section, .imp-settings__section, .imp-composer, .imp-chart, .imp-empty, .imp-hours, .imp-done__week, .imp-tablewrap) {
	border: none;
	border-radius: 24px;
	background: var(--md-surfaceContainerLow);
	box-shadow: 0 8px 24px rgba(60, 50, 140, 0.07);
}
body.android :is(.imp-timer, .imp-day, .imp-inblock, .imp-others, .imp-warning, .imp-cpage__section, .imp-settings__section, .imp-composer, .imp-empty) {
	padding: 16px;
}
body.android .imp-timer:not(.imp-timer--idle) {
	background: var(--c);
}
body.android .imp-warning {
	background: var(--md-tertiaryContainer);
	color: var(--md-onTertiaryContainer);
	border-left: none;
}
body.android .imp-warning * {
	color: inherit;
}
body.android .imp-now,
body.android .imp-now__main {
	gap: 12px;
}

/* --- form controls ------------------------------------------------------------------------- */

/* Outlined text fields */
body.android :is(input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="url"], input[type="date"], input[type="time"], input:not([type]), select, textarea) {
	min-height: 48px;
	padding: 8px 14px;
	border: 1px solid color-mix(in srgb, var(--md-outline) 70%, transparent);
	border-radius: 14px;
	background: color-mix(in srgb, var(--md-onSurface) 3%, transparent);
	color: var(--md-onSurface);
	caret-color: var(--md-primary);
	font-size: 16px;
	box-shadow: none;
	outline: none;
	transition: border-color 0.18s var(--md-ease), box-shadow 0.18s var(--md-ease), background-color 0.18s var(--md-ease);
}
body.android :is(input, textarea)::placeholder {
	color: color-mix(in srgb, var(--md-onSurface) 42%, transparent);
	font-weight: 400;
}
/* Selected: one clear accent edge, a soft halo and a tinted fill (no second outline) */
body.android #pactwise-app :is(input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="url"], input[type="date"], input[type="time"], input:not([type]), select, textarea):is(:focus, :focus-visible) {
	border-color: var(--md-primary);
	background: color-mix(in srgb, var(--md-primary) 7%, transparent);
	box-shadow: 0 0 0 1px var(--md-primary), 0 0 0 5px color-mix(in srgb, var(--md-primary) 20%, transparent);
	outline: none;
}
/* The task composer and in-place editing keep their own borderless fields */
body.android :is(.imp-composer__title, .imp-composer__input) {
	min-height: 40px;
	padding: 0 4px;
	border: none !important;
	box-shadow: none !important;
}
body.android .imp-editable__field {
	min-height: 0;
	padding: 2px 6px;
	border-radius: 4px;
}

/* Checkboxes */
body.android input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	min-height: 0;
	margin: 11px;
	padding: 0;
	border: 2px solid var(--md-onSurfaceVariant);
	border-radius: 2px;
	background: transparent no-repeat center / 14px 14px;
	cursor: pointer;
	position: relative;
}
body.android input[type="checkbox"]::before {
	/* 40px touch target with a round state layer */
	content: "";
	position: absolute;
	inset: -13px;
	border-radius: 50%;
}
body.android input[type="checkbox"]:active::before {
	background: color-mix(in srgb, var(--c, var(--md-primary)) 14%, transparent);
}
body.android input[type="checkbox"]:checked {
	border-color: var(--c, var(--md-primary));
	background-color: var(--c, var(--md-primary));
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12.5l5 5 10-11' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* --- chips, badges ------------------------------------------------------------------------- */

body.android #pactwise-app .imp-chip,
.m3 .imp-menu .imp-chip {
	height: 28px;
	padding: 0 10px;
	border: 1px solid var(--md-outlineVariant);
	border-radius: 8px;
	background: transparent;
	color: var(--md-onSurfaceVariant);
	font-size: 12.5px;
	font-weight: 500;
}
body.android #pactwise-app .imp-chip:not(.is-default):not(.is-preview) {
	border-color: transparent;
	background: color-mix(in srgb, var(--c, var(--md-primary)) 16%, var(--md-surface));
	color: var(--md-onSurface);
}
body.android .imp-badge {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 8px;
	border-radius: 8px;
	background: var(--md-secondaryContainer);
	color: var(--md-onSecondaryContainer);
	font-size: 12px;
	font-weight: 500;
}
body.android .imp-badge.is-stuck {
	background: var(--md-tertiaryContainer);
	color: var(--md-onTertiaryContainer);
}

/* --- Tasks: list rows and the floating "New task" button -------------------------------------- */

body.android .imp-tq__item {
	padding: 12px 4px 12px 0;
	border-radius: 0;
}
body.android .imp-tq__item + .imp-tq__item {
	border-top: 1px solid var(--md-outlineVariant);
}
body.android .imp-tq__item:hover,
body.android .imp-tq__item:focus-within {
	background: transparent;
}
body.android .imp-tq__title {
	font-size: 16px;
	font-weight: 500;
}
body.android .imp-tq__actions,
body.android .imp-tq__handle,
body.android #pactwise-app .imp-tq__del {
	opacity: 1;
}
body.android .imp-tq__actions {
	position: static;
	padding: 0;
	background: none;
	pointer-events: auto;
}
body.android .imp-tq__block {
	margin-top: 20px;
	color: var(--md-primary);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.5px;
}
body.android .imp-tq__bar {
	height: 4px;
	border-radius: 2px;
	background: var(--md-surfaceContainerHighest);
}
body.android .imp-tq__new {
	display: none !important; /* replaced by the floating button */
}
/* Extended floating action button */
body.android .imp-tq__top .imp-button {
	position: fixed;
	z-index: 20;
	right: calc(16px + var(--inset-right));
	bottom: calc(var(--navbar) + var(--inset-bottom) + 16px);
	height: 56px;
	padding: 0 20px 0 16px;
	border: none;
	border-radius: 16px;
	background: var(--md-primaryContainer);
	color: var(--md-onPrimaryContainer);
	font-size: 14px;
	font-weight: 500;
	box-shadow: var(--md-elev-3);
}
body.android .imp-tasks:has(.imp-composer) .imp-tq__top .imp-button {
	display: none;
}
body.android .imp-composer {
	border: none;
	box-shadow: var(--md-elev-1);
	background: var(--md-surfaceContainerLow);
}

/* --- Menus (appended to <body>) ---------------------------------------------------------------- */

.m3 .imp-menu {
	min-width: 200px;
	padding: 8px 0;
	border: none;
	border-radius: 4px;
	background: var(--md-surfaceContainer);
	color: var(--md-onSurface);
	box-shadow: var(--md-elev-2);
	font: 400 14px/20px Poppins, Roboto, system-ui, sans-serif;
}
.m3 .imp-menu .imp-menu__item {
	min-height: 48px;
	padding: 0 16px;
	border-radius: 0;
	font-size: 14px;
}
.m3 .imp-menu .imp-menu__item:active {
	background: color-mix(in srgb, var(--md-onSurface) 10%, transparent);
}
.m3 .imp-menu .imp-menu__item.is-danger {
	color: var(--md-error);
}
.m3 .imp-menu__chips {
	padding: 4px 12px;
}
.m3 .imp-menu .imp-menu__input {
	width: calc(100% - 24px);
	margin: 8px 12px 4px;
	border-radius: 4px;
	border-color: var(--md-outline);
	background: transparent;
}

/* --- Snackbar ----------------------------------------------------------------------------------- */

.toast {
	position: fixed;
	z-index: 100;
	left: calc(12px + var(--inset-left));
	right: calc(12px + var(--inset-right));
	bottom: calc(var(--navbar) + var(--inset-bottom) + 12px);
	min-height: 48px;
	padding: 14px 16px;
	border-radius: 4px;
	background: var(--md-inverseSurface);
	color: var(--md-inverseOnSurface);
	box-shadow: var(--md-elev-3);
	font-size: 14px;
	line-height: 20px;
}
.toast.is-error {
	background: var(--md-errorContainer);
	color: var(--md-onErrorContainer);
}

/* Plan a block: date and time pickers follow light/dark */
body.android .imp-newblock h2 { margin: 0 0 12px; }
body.android :is(input[type="date"], input[type="time"]) { color-scheme: light; }
html.m3-dark body.android :is(input[type="date"], input[type="time"]) { color-scheme: dark; }

/* --- the phone's pages ------------------------------------------------------------- */

body.android .imp-psec__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}
body.android .imp-psec__head .imp-muted {
	font-size: 12px;
	font-weight: 600;
}
body.android .imp-page :is(.imp-pweek, .imp-ptoday, .imp-pcard) h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
}
body.android :is(.imp-pweek, .imp-pcard) {
	margin: 0 0 12px;
	border-radius: 24px;
	background: var(--md-surfaceContainerLow);
	box-shadow: 0 6px 18px rgba(60, 50, 140, 0.05);
}
body.android .imp-pcard {
	padding: 16px 18px;
}
body.android .imp-pnow .imp-timer {
	margin-bottom: 12px;
}

/* Now: this week's rings, today's blocks */
body.android .imp-pweek {
	padding: 14px 0 10px;
}
body.android .imp-pweek .imp-psec__head {
	padding: 0 18px;
}
body.android .imp-pweek .imp-rings {
	margin: 8px 0 0;
	padding: 0;
	border: none;
}
body.android #pactwise-app .imp-pweek .imp-rings .imp-icon-btn {
	display: none;
}
body.android .imp-ptoday {
	margin: 0 0 12px;
}
body.android .imp-page .imp-ptoday h2 {
	margin: 4px 4px 8px;
}
body.android .imp-plist {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 6px 0;
	border-radius: 24px;
	background: var(--md-surfaceContainerLow);
	list-style: none;
}
/* Today: a timeline (time, colour, what, how long) */
body.android .imp-prow {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 6px 16px 6px 14px;
}
body.android .imp-prow + .imp-prow {
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--md-outlineVariant) 55%, transparent);
}
body.android .imp-prow__time {
	flex: 0 0 auto;
	min-width: 44px;
	white-space: nowrap;
	color: var(--md-onSurfaceVariant);
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	text-align: right;
}
body.android .imp-prow__dot {
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 4px;
	background: var(--c);
}
body.android .imp-prow.is-now {
	margin: 2px 6px;
	padding: 6px 10px 6px 8px;
	border-radius: 18px;
	background: color-mix(in srgb, var(--c) 10%, var(--md-surfaceContainerLow));
	box-shadow: inset 0 0 0 2px var(--c);
}
body.android .imp-prow.is-now + .imp-prow,
body.android .imp-prow__line + .imp-prow {
	box-shadow: none;
}
body.android .imp-prow.is-past :is(.imp-prow__text, .imp-prow__dot, .imp-prow__len, .imp-prow__time) {
	opacity: 0.55;
}
body.android .imp-prow__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	color: var(--md-onSurface);
	text-decoration: none;
}
body.android .imp-prow__text strong {
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}
body.android .imp-prow__text .imp-muted {
	font-size: 12px;
	font-weight: 600;
}
body.android :is(.imp-prow__now, .imp-prow__len) {
	flex: 0 0 auto;
	padding: 3px 10px;
	border-radius: 10px;
	background: var(--md-surfaceContainerHigh);
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 700;
}
body.android .imp-prow__now {
	background: var(--c);
	color: var(--on-c);
}
/* now, between past and coming blocks */
body.android .imp-prow__line {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 2px 16px 2px 14px;
	color: var(--md-error);
	font-size: 11px;
	font-weight: 700;
}
body.android .imp-prow__line span {
	flex: 0 0 auto;
	min-width: 44px;
	white-space: nowrap;
	text-align: right;
}
body.android .imp-prow__line::after {
	content: "";
	flex: 1;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
}
body.android .imp-pempty {
	margin: 0 4px;
}

/* Placeholders while a page is built */
body.android .imp-prow--sk {
	pointer-events: none;
}
body.android .imp-prow--sk .imp-skrow__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
}

/* Tasks: commitments as chips, one commitment's queue */
body.android .imp-pchips {
	display: flex;
	gap: 8px;
	margin: 0 calc(-16px - var(--inset-right)) 12px calc(-16px - var(--inset-left));
	padding: 2px calc(16px + var(--inset-right)) 2px calc(16px + var(--inset-left));
	overflow-x: auto;
}
body.android .imp-pchip {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 16px 0 12px;
	border: 1px solid var(--md-outlineVariant);
	border-radius: 20px;
	background: var(--md-surfaceContainerLow);
	color: var(--md-onSurface);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}
body.android .imp-pchip[aria-selected="true"] {
	border: 2px solid var(--c, var(--md-onSurface));
	background: color-mix(in srgb, var(--c, var(--md-primary)) 16%, var(--md-surfaceContainerLow));
	color: var(--md-onSurface);
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tcol {
	width: auto;
	min-width: 0;
	max-height: none;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tcol__body {
	overflow: visible;
	padding: 0;
}
body.android .imp-pcommit .imp-tcol__head {
	display: none;
}
body.android .imp-ptasks .imp-tcol__head {
	margin: 0 0 8px;
	padding: 0 2px;
}
body.android .imp-ptasks .imp-tcol__head .imp-tile {
	display: none;
}
/* No arrows, drag handles or ×: reorder and delete are in the ⋯ menu (and clearing a subtask's title removes it) */
body.android .imp-tq__actions .imp-icon-btn:not(.imp-tq__more),
body.android :is(.imp-tq__handle, .imp-qitem__handle, .imp-sub__handle, .imp-tq__del) {
	display: none;
}
body.android .imp-tq__sub {
	min-height: 44px;
}

/* Done: the week as pairs of bars, then the day */
body.android .imp-pdays {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	margin: 10px -6px 8px;
}
body.android .imp-pday {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-height: 44px;
	padding: 6px 0 4px;
	border: none;
	border-radius: 14px;
	background: transparent;
	color: var(--md-onSurface);
}
body.android .imp-pday[aria-selected="true"] {
	background: var(--md-secondaryContainer);
	box-shadow: inset 0 0 0 2px var(--md-primary);
}
body.android .imp-pday__bars {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 3px;
	height: 66px;
}
body.android :is(.imp-pday__planned, .imp-pday__tracked, .imp-plegend__planned, .imp-plegend__tracked) {
	display: block;
	width: 9px;
	border-radius: 4px;
}
body.android :is(.imp-pday__planned, .imp-plegend__planned) {
	background: color-mix(in srgb, var(--md-primary) 26%, transparent);
}
body.android :is(.imp-pday__tracked, .imp-plegend__tracked) {
	background: var(--md-primary);
}
body.android .imp-pday__letter {
	font-size: 12px;
	font-weight: 700;
}
body.android .imp-pday__num {
	color: var(--md-onSurfaceVariant);
	font-size: 11px;
	font-weight: 600;
}
body.android .imp-pday.is-today .imp-pday__letter {
	color: var(--md-primary);
}
body.android .imp-plegend {
	display: flex;
	gap: 16px;
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 600;
}
body.android .imp-plegend > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
body.android :is(.imp-plegend__planned, .imp-plegend__tracked) {
	width: 10px;
	height: 10px;
	border-radius: 3px;
}

/* Bars against a plan or a goal (Done's day, Time's goals) */
body.android .imp-pbars {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 12px 0;
	padding: 0;
	list-style: none;
}
body.android .imp-pbars li {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
body.android .imp-pbars__label {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
}
body.android .imp-pbars__label > :first-child {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: var(--md-onSurface);
}
body.android .imp-pbars__label .imp-muted {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 600;
}
body.android .imp-pbars__label strong {
	color: var(--md-onSurface);
	font-weight: 800;
}
body.android .imp-pbars__track {
	height: 10px;
	overflow: hidden;
	border-radius: 99px;
	background: color-mix(in srgb, var(--c) 20%, transparent);
}
body.android .imp-pbars__track span {
	display: block;
	height: 100%;
	border-radius: 99px;
	background: var(--c);
}
body.android .imp-pbars__note {
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 600;
}
body.android .imp-pbars__note.is-short {
	color: var(--md-warning);
}
body.android .imp-pnogoal {
	margin: 0;
	padding-top: 10px;
	border-top: 1px solid var(--md-outlineVariant);
	font-size: 13px;
}

/* Done: what was checked off */
body.android .imp-pticked ul {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}
body.android .imp-pticked li {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	font-size: 14px;
}
body.android .imp-pticked__check {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--c);
	color: #ffffff;
}
body.android .imp-pticked__check svg {
	stroke-width: 3.2;
}
body.android .imp-pticked__title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
body.android .imp-pticked .imp-muted {
	font-size: 12px;
	font-weight: 600;
}

/* Time: four weeks */
body.android .imp-pweeks {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: end;
	gap: 12px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}
body.android .imp-pweeks li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 600;
}
body.android .imp-pweeks__val {
	font-size: 12px;
	font-weight: 700;
}
body.android .imp-pweeks__bar {
	width: 100%;
	max-width: 44px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--md-primary) 32%, transparent);
}
body.android .imp-pweeks li.is-current .imp-pweeks__bar {
	background: var(--md-primary);
}
body.android .imp-pmore {
	margin: 4px 0 12px;
}
body.android .imp-pmore > summary {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0 18px;
	border-radius: 18px;
	background: var(--md-surfaceContainerLow);
	font-weight: 700;
	list-style: none;
}
body.android .imp-pmore > summary::-webkit-details-marker {
	display: none;
}
body.android .imp-pmore .imp-page {
	padding: 0;
}
body.android :is(.imp-pmore, .imp-psettings, .imp-pcommit) .imp-phead,
body.android .imp-pcommit .imp-cpage__head {
	display: none;
}

/* A commitment's page */
body.android .imp-page .imp-pbar h1.imp-pcommit__name {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
body.android .imp-pcommit__name > span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
body.android .imp-pcommit__name .imp-tile {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	font-size: 15px;
}
body.android .imp-pcommit__play {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: var(--c);
	color: var(--on-c);
}
body.android .imp-ptabs {
	display: flex;
	align-items: stretch;
	margin: 0 calc(-16px - var(--inset-right)) 12px calc(-16px - var(--inset-left));
	padding: 0 calc(8px + var(--inset-right)) 0 calc(8px + var(--inset-left));
	border-bottom: 1px solid var(--md-outlineVariant);
}
body.android .imp-ptabs button,
body.android .imp-ptabs__edit {
	display: grid;
	flex: 1 1 0;
	place-items: center;
	height: 48px;
	border: none;
	background: transparent;
	color: var(--md-onSurfaceVariant);
	font-size: 14px;
	font-weight: 600;
}
body.android .imp-ptabs button[aria-selected="true"] {
	color: var(--md-onSurface);
	font-weight: 800;
	box-shadow: inset 0 -3px 0 var(--c);
}
body.android .imp-ptabs__edit {
	flex: 0 0 auto;
	padding: 0 16px;
	color: var(--md-primary);
}

/* Settings: the account first */
body.android .imp-paccount {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 64px;
	margin: 0 0 12px;
	padding: 10px 14px 10px 18px;
	border: none;
	border-radius: 20px;
	background: var(--md-surfaceContainerLow);
	color: var(--md-onSurface);
	text-align: left;
}
body.android .imp-paccount > span {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}
body.android .imp-paccount .imp-muted {
	font-size: 12px;
	font-weight: 600;
}

/* A page inside a phone page (Settings, a commitment's overview, Time's extras): no second margin */
body.android .imp-page .imp-page {
	max-width: none;
	margin: 0;
	padding: 0;
}

/* --- Calendar: Day, 3 days, Month ----------------------------------------------------- */

body.android .imp-pcal {
	position: relative;
	height: 100%;
	padding-bottom: 0;
	filter: none;
}
body.android .imp-pcal__today {
	margin-left: 2px;
}
body.android .imp-pcal__views {
	display: grid;
	flex: 0 0 auto;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
	margin: 0 0 8px;
	padding: 4px;
	border-radius: 22px;
	background: var(--md-surfaceContainerHigh);
}
body.android .imp-pcal__views button {
	height: 38px;
	border: none;
	border-radius: 18px;
	background: transparent;
	color: var(--md-onSurfaceVariant);
	font-size: 14px;
	font-weight: 600;
}
body.android .imp-pcal__views button[aria-selected="true"] {
	background: var(--md-surfaceContainerLow);
	color: var(--md-onSurface);
	font-weight: 800;
	box-shadow: 0 1px 3px rgba(36, 34, 58, 0.12);
}
body.android .imp-pcal .imp-cv__grid,
body.android .imp-pcal .imp-cv__month {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0 calc(-16px - var(--inset-right)) 0 calc(-16px - var(--inset-left));
	padding: 0 !important;
	border-radius: 22px 22px 0 0 !important;
	background: var(--md-surfaceContainerLow);
}
body.android .imp-pcal .imp-cv__dayheads {
	grid-template-columns: 44px repeat(var(--days), minmax(0, 1fr));
	column-gap: 4px;
	padding: 8px 8px 6px 0;
	border-bottom: 1px solid var(--md-outlineVariant);
}
body.android .imp-pcal .imp-cv__dn {
	min-width: 32px;
	height: 32px;
	border-radius: 16px;
	font-size: 16px;
}
body.android .imp-pcal .imp-cv__wd {
	font-size: 11px;
}
body.android .imp-pcal .imp-cv__body {
	grid-template-columns: 44px minmax(0, 1fr);
	margin-right: 8px;
	/* A finger scrolls; holding still picks up a block (calPointer) */
	touch-action: pan-y;
	-webkit-touch-callout: none;
}
body.android .imp-pcal .imp-cv__hours span {
	font-size: 11px;
}
body.android .imp-pcal .imp-cv__ev {
	padding: 4px 6px;
	border-radius: 10px;
	font-size: 12px;
}
body.android .imp-pcal .imp-cv__ev.is-dragging {
	box-shadow: 0 12px 24px rgba(36, 34, 58, 0.3);
	transform: rotate(-1.5deg);
}
body.android .imp-pcal .imp-cv__resize {
	height: 14px;
}
body.android .imp-pcal__fab {
	position: absolute;
	right: calc(16px + var(--inset-right));
	bottom: 16px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 8px;
	height: 56px;
	padding: 0 20px 0 16px;
	border: none;
	border-radius: 18px;
	background: var(--md-primary);
	color: var(--md-onPrimary);
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 8px 18px color-mix(in srgb, var(--md-primary) 35%, transparent);
}
/* Month: small cells, a dot and the time per block */
body.android .imp-pcal .imp-cv__month {
	gap: 0;
	padding: 4px 4px 8px !important;
}
body.android .imp-pcal .imp-cv__mday {
	min-height: 0;
	padding: 2px;
}
body.android .imp-pcal .imp-cv__mnum {
	min-width: 32px;
	height: 32px;
	font-size: 13px;
}
body.android .imp-pcal .imp-cv__month {
	grid-template-rows: auto repeat(6, minmax(0, 1fr));
}
body.android .imp-pcal .imp-cv__mday {
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow: hidden;
}
/* a dot per block (the day view has the rest) */
body.android .imp-pcal .imp-cv__mlist {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 3px;
	margin: 2px 0 0;
}
body.android .imp-pcal .imp-cv__chip {
	min-height: 0;
	padding: 0;
	background: none;
}
body.android .imp-pcal :is(.imp-cv__chiptitle, .imp-cv__chiptime) {
	display: none;
}
body.android .imp-pcal .imp-cv__chip .imp-dot {
	width: 7px;
	height: 7px;
	margin: 0;
}
body.android .imp-pcal .imp-cv__more {
	min-height: 0;
	padding: 0;
	font-size: 10px;
	line-height: 7px;
}
body.android .imp-page .imp-pcal .imp-pbar h1 {
	font-size: 22px;
	/* One line, whatever the date and with Today beside it */
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
body.android .imp-pcal .imp-pbar p {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
body.android .imp-pcal__today {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* The calendar's panels: a sheet from the bottom */
body.android .imp-cvpanel--sheet {
	top: auto !important;
	right: 0;
	bottom: 0;
	left: 0 !important;
	width: 100%;
	max-height: 85vh;
	padding: 22px calc(20px + var(--inset-right)) calc(20px + var(--inset-bottom)) calc(20px + var(--inset-left));
	border-radius: 28px 28px 0 0;
	background: var(--md-surfaceContainerLow);
	box-shadow: 0 -12px 40px rgba(36, 34, 58, 0.25);
}

/* Settings: other calendars as busy time */
body.android .imp-pbusy {
	margin: 0 0 12px;
	padding: 6px 0 8px;
	border-radius: 20px;
	background: var(--md-surfaceContainerLow);
}
body.android .imp-pbusy__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px 8px 18px;
}
body.android .imp-pbusy__head > span {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
body.android .imp-pbusy__head .imp-muted {
	font-size: 12px;
	line-height: 1.45;
}
body.android .imp-pbusy__head input {
	flex: 0 0 auto;
	position: relative;
	width: 52px;
	height: 32px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	border: 2px solid var(--md-outline);
	border-radius: 16px;
	background: var(--md-surfaceContainerHighest);
	transition: background 0.15s, border-color 0.15s;
}
body.android .imp-pbusy__head input::after {
	content: '';
	position: absolute;
	top: 6px;
	left: 6px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--md-outline);
	transition: transform 0.15s, width 0.15s, height 0.15s, top 0.15s, background 0.15s;
}
body.android .imp-pbusy__head input:checked {
	border-color: var(--md-primary);
	background: var(--md-primary);
}
body.android .imp-pbusy__head input:checked::after {
	top: 2px;
	width: 24px;
	height: 24px;
	background: var(--md-onPrimary);
	transform: translateX(20px);
}
body.android .imp-pbusy__head input:focus-visible {
	outline: 2px solid var(--md-primary);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	body.android .imp-pbusy__head input,
	body.android .imp-pbusy__head input::after {
		transition: none;
	}
}
body.android .imp-pbusy__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
body.android .imp-pbusy__list label {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 0 18px 0 22px;
}
body.android .imp-pbusy__list input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
}
body.android .imp-pbusy__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
body.android .imp-pbusy__list .imp-muted {
	font-size: 12px;
}
body.android .imp-pbusy__none {
	margin: 0 18px 6px;
	font-size: 12px;
}

/* Planner: a sideways swipe changes the days; they slide in from that side */
body.android .imp-pcal .imp-cv__grid,
body.android .imp-pcal .imp-cv__month {
	touch-action: pan-y;
}
body.android .imp-pcal .imp-pcal--next {
	animation: imp-pcal-in-next 0.18s ease-out;
}
body.android .imp-pcal .imp-pcal--prev {
	animation: imp-pcal-in-prev 0.18s ease-out;
}
@keyframes imp-pcal-in-next {
	from { transform: translateX(28px); opacity: 0.4; }
}
@keyframes imp-pcal-in-prev {
	from { transform: translateX(-28px); opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
	body.android .imp-pcal .imp-pcal--next,
	body.android .imp-pcal .imp-pcal--prev {
		animation: none;
	}
}
body.android .imp-cvpanel--sheet:focus {
	outline: none;
}

/* --- Startup splash (app.html): Android's splash screen hands over to this one --- */
.splash {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	background: #f6f5fb;
	transition: opacity 0.28s ease-out, visibility 0s linear 0.28s;
}
@media (prefers-color-scheme: dark) {
	.splash {
		background: #14121d;
	}
}
html.m3-dark .splash {
	background: #14121d;
}
.splash__icon {
	grid-area: 1 / 1;
	width: 240px;
	height: 240px;
	transition: transform 0.28s ease-out;
}
/* The two blocks: they part a little and join again, the overlap lighting up as they meet */
.splash__top,
.splash__bottom,
.splash__joint {
	animation: splash-apart 1.6s cubic-bezier(0.45, 0, 0.25, 1) 0.25s infinite;
}
.splash__bottom {
	animation-name: splash-apart-b;
}
.splash__joint {
	animation-name: splash-joint;
}
@keyframes splash-apart {
	0%, 70%, 100% { transform: none; }
	30% { transform: translate(-6px, -6px); }
}
@keyframes splash-apart-b {
	0%, 70%, 100% { transform: none; }
	30% { transform: translate(6px, 6px); }
}
@keyframes splash-joint {
	0%, 70%, 100% { opacity: 1; }
	15%, 45% { opacity: 0; }
}
/* Below the icon, only if it takes a while (a first sync with a slow server) */
.splash__dots {
	grid-area: 1 / 1;
	display: flex;
	gap: 8px;
	margin-top: 220px;
	opacity: 0;
	animation: splash-show 0.4s ease-out 1.2s forwards;
}
.splash__dots span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #6c5ce7;
	animation: splash-dot 1.2s ease-in-out infinite;
}
.splash__dots span:nth-child(2) { animation-delay: 0.15s; }
.splash__dots span:nth-child(3) { animation-delay: 0.3s; }
@media (prefers-color-scheme: dark) {
	.splash__dots span {
		background: #8b7cf6;
	}
}
html.m3-dark .splash__dots span {
	background: #8b7cf6;
}
@keyframes splash-show {
	to { opacity: 1; }
}
@keyframes splash-dot {
	0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
	40% { opacity: 1; transform: none; }
}
/* Ready: the icon grows a little and everything fades into the app */
.splash.is-done {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
.splash.is-done .splash__icon {
	transform: scale(1.12);
}
@media (prefers-reduced-motion: reduce) {
	.splash__top,
	.splash__bottom,
	.splash__joint,
	.splash__dots span {
		animation: none;
	}
	.splash__dots {
		animation-duration: 0s;
	}
	.splash.is-done .splash__icon {
		transform: none;
	}
}

/* --- Tasks on the phone: one rounded list, hairlines between tasks, blocks as captions ------ */
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 4px 0;
	border-radius: 24px;
	background: var(--md-surfaceContainerLow);
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__item,
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__item + .imp-tq__item {
	margin: 0;
	padding: 14px 12px 12px 16px;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__item + .imp-tq__item {
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--md-outlineVariant) 60%, transparent);
}
html.m3-dark body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__item,
html.m3-dark body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__item + .imp-tq__item {
	border-color: transparent;
	background: transparent;
}
/* The commitment's colour in the checkboxes (instead of a bar down the side) */
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq input[type="checkbox"] {
	width: 22px;
	height: 22px !important;
	min-width: 0;
	min-height: 0;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
	display: inline-grid;
	place-content: center;
	flex: none;
	margin: 0;
	border: 2px solid var(--c, var(--md-primary));
	border-radius: 8px;
	background: transparent;
	transition: background-color 0.15s var(--md-ease);
}
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq input[type="checkbox"]:checked {
	background: var(--c, var(--md-primary)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}
/* Title (and checkbox) with ⋯ on the first line; estimate, carried and progress below */
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 12px;
	row-gap: 6px;
	min-height: 0;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__head:has(> .imp-tq__check) {
	grid-template-columns: auto minmax(0, 1fr) auto;
}
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq__head > .imp-tq__check {
	grid-row: 1;
	grid-column: 1;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__head:has(> .imp-tq__check) > .imp-tq__title {
	grid-column: 2;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__title {
	grid-row: 1;
	flex: none;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__actions {
	grid-row: 1;
	grid-column: -2 / -1;
	align-self: start;
	margin: -8px -4px -8px 0;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__info {
	grid-row: 2;
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__head:has(> .imp-tq__check) .imp-tq__info {
	grid-column: 2 / -1;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__info:empty {
	display: none;
}
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq__info > .imp-chip {
	margin-left: 0 !important;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__meta {
	margin-left: 0;
	padding-left: 0;
	color: var(--md-onSurfaceVariant);
	font-size: 13px;
	font-weight: 600;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__meta:empty {
	display: none;
}
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq__check {
	width: 24px;
	height: 24px !important;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__bar {
	height: 6px;
	margin: 10px 0 4px;
	border-radius: 3px;
	background: color-mix(in srgb, var(--c, var(--md-primary)) 16%, transparent);
}
/* Subtasks: rows inside the card, a hairline between them */
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq__sub {
	gap: 12px;
	min-height: 48px;
	padding: 2px 0;
}
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq__sub + .imp-tq__sub {
	border-top: 1px solid var(--md-outlineVariant);
}
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq__sub input[type="checkbox"] {
	width: 22px;
	height: 22px;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__subtitle {
	font-size: 15px;
}
body.android #pactwise-app :is(.imp-ptasks, .imp-pcommit) .imp-tq__donetoggle {
	margin: 4px 0 0 34px;
	min-height: 36px;
}
/* A block: a caption row in the list, what it holds beside it */
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__block {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 2px 10px;
	margin: 0;
	padding: 14px 16px 4px;
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__block:not(:first-child) {
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--md-outlineVariant) 60%, transparent);
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__block + .imp-tq__item {
	box-shadow: none;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__block.is-current {
	color: color-mix(in srgb, var(--c, var(--md-primary)) 70%, var(--md-onSurface));
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__block::after {
	display: none;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__blockname {
	max-width: 100%;
	white-space: normal;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__blockmeta {
	color: var(--md-onSurfaceVariant);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	white-space: normal;
}
body.android :is(.imp-ptasks, .imp-pcommit) .imp-tq__block.is-none .imp-tq__blockname {
	color: var(--md-onSurfaceVariant);
}

/* Swiping to another commitment: its tasks slide in from that side */
body.android .imp-ptasks .imp-tcol {
	touch-action: pan-y;
}
body.android .imp-pslide--next {
	animation: imp-pcal-in-next 0.18s ease-out;
}
body.android .imp-pslide--prev {
	animation: imp-pcal-in-prev 0.18s ease-out;
}
@media (prefers-reduced-motion: reduce) {
	body.android :is(.imp-pslide--next, .imp-pslide--prev) {
		animation: none;
	}
}

/* Swipe anywhere on Tasks and Done (the whole screen, even below a short list) */
body.android .imp-main--swipe {
	touch-action: pan-y;
}

/* Tasks | Notes: one commitment's two lists, under its chip */
body.android .imp-pseg {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px;
	margin: 0 0 12px;
	padding: 4px;
	border-radius: 22px;
	background: var(--md-surfaceContainerHigh);
}
body.android .imp-pseg button {
	height: 38px;
	border: none;
	border-radius: 18px;
	background: transparent;
	color: var(--md-onSurfaceVariant);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
}
body.android .imp-pseg button[aria-selected="true"] {
	background: var(--md-surfaceContainerLow);
	color: var(--md-onSurface);
	font-weight: 800;
	box-shadow: 0 1px 3px rgba(36, 34, 58, 0.12);
}

/* Progress: each of the last four weeks opens that week */
body.android .imp-pweeks li {
	align-items: stretch;
}
body.android .imp-pweeks__btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	width: 100%;
	min-height: 48px;
	padding: 4px 0;
	border: none;
	border-radius: 14px;
	background: transparent;
	color: inherit;
	font: inherit;
}
body.android .imp-pweeks__btn[aria-pressed="true"] {
	background: var(--md-surfaceContainerHigh);
}
body.android .imp-pweeks li.is-current .imp-pweeks__bar {
	background: var(--md-primary);
}

/* The placeholder page while a tab loads: below the status bar, like the page it stands for */
body.android .imp-skpage {
	padding-top: calc(var(--inset-top) + 18px);
}

/* Settings: blocks in the account's calendar */
body.android .imp-paccal__ask {
	margin: 4px 18px 8px;
	padding: 12px 14px;
	border-radius: 16px;
	background: var(--md-surfaceContainerHigh);
}
body.android .imp-paccal__ask p {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.45;
}
body.android .imp-pcal > .imp-paccal__ask {
	margin: 12px 0;
	padding: 20px;
	text-align: center;
}

/* Settings → Appearance: automatic, light, dark */
body.android .imp-plook {
	margin: 0 0 12px;
	padding: 16px 16px 4px;
	border-radius: 20px;
	background: var(--md-surfaceContainerLow);
}
body.android .imp-plook h2 {
	margin: 0 4px 12px;
	font-size: 16px;
	font-weight: 800;
}
body.android .imp-plook__seg {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.android .imp-plook__seg button {
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
body.android .imp-plook__seg button[aria-checked="true"] {
	background: var(--md-surfaceContainerLow);
	color: var(--md-onSurface);
	font-weight: 800;
	box-shadow: 0 1px 3px rgba(36, 34, 58, 0.12);
}
body.android .imp-plook .imp-pseg {
	background: var(--md-surfaceContainerHigh);
}

/* --- Now: the top card follows the moment ------------------------------------------------ */
body.android .imp-hero {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0 0 18px;
	padding: 20px;
	border-radius: 28px;
	background: var(--md-surfaceContainerLow);
	box-shadow: 0 6px 18px rgba(60, 50, 140, 0.05);
}
body.android .imp-hero--tracking {
	background: color-mix(in srgb, var(--c) 14%, var(--md-surfaceContainerLow));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent);
}
body.android .imp-hero--block {
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent);
}
body.android .imp-hero__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
body.android .imp-hero__label {
	display: flex;
	align-items: center;
	gap: 8px;
	color: color-mix(in srgb, var(--c, var(--md-primary)) 70%, var(--md-onSurface));
	font-size: 13px;
	font-weight: 700;
}
body.android .imp-hero__label--soft {
	gap: 0;
	white-space: pre;
}
body.android :is(.imp-hero__pulse, .imp-hero__dot) {
	width: 10px;
	height: 10px;
	border-radius: 4px;
	background: var(--c, var(--md-primary));
}
body.android .imp-hero__pulse {
	border-radius: 50%;
	animation: imp-hero-pulse 1.6s ease-in-out infinite;
}
@keyframes imp-hero-pulse {
	50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c, var(--md-primary)) 25%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
	body.android .imp-hero__pulse { animation: none; }
}
body.android .imp-hero__range {
	color: var(--md-onSurfaceVariant);
	font-size: 13px;
	font-weight: 600;
}
body.android .imp-hero__clock {
	color: var(--md-onSurface);
	font-size: 54px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -1px;
	font-variant-numeric: tabular-nums;
}
body.android .imp-hero__big {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 42px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -1px;
}
body.android .imp-hero__unit {
	color: var(--md-onSurfaceVariant);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0;
}
body.android .imp-hero__progress {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
body.android .imp-hero__bar {
	height: 8px;
	overflow: hidden;
	border-radius: 4px;
	background: color-mix(in srgb, var(--c) 22%, transparent);
}
body.android .imp-hero__bar span {
	display: block;
	width: var(--p);
	height: 100%;
	border-radius: 4px;
	background: var(--c);
	transition: width 1s linear;
}
body.android .imp-hero__sub {
	margin: 0;
	color: var(--md-onSurfaceVariant);
	font-size: 13px;
	font-weight: 600;
}
body.android .imp-hero__pomo {
	color: var(--md-onSurfaceVariant);
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
body.android .imp-hero__tasks {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
body.android .imp-hero--tracking .imp-hero__tasks {
	padding: 4px 14px;
	border-radius: 18px;
	background: color-mix(in srgb, var(--c) 10%, var(--md-surfaceContainerLow));
}
body.android .imp-hero__caption {
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
}
body.android .imp-hero__task {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	font-size: 15px;
	font-weight: 600;
}
body.android .imp-hero__task input {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--c);
}
body.android .imp-hero__task > span:first-of-type {
	flex: 1;
	min-width: 0;
}
body.android .imp-hero__task .imp-muted {
	font-weight: 500;
}
body.android .imp-hero__est {
	padding: 2px 9px;
	border-radius: 9px;
	box-shadow: inset 0 0 0 1px var(--md-outlineVariant);
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 600;
}
body.android .imp-hero__actions {
	display: flex;
	gap: 10px;
}
body.android #pactwise-app .imp-hero__btn {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 14px;
	border: none;
	border-radius: 18px;
	background: var(--md-surfaceContainerHigh);
	color: var(--md-onSurface);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}
body.android #pactwise-app .imp-hero__btn--main {
	background: var(--c, var(--md-primary));
	color: var(--on-c, var(--md-onPrimary));
}
body.android #pactwise-app .imp-hero__btn--tint {
	background: color-mix(in srgb, var(--c) 18%, var(--md-surfaceContainerLow));
	color: color-mix(in srgb, var(--c) 55%, var(--md-onSurface));
}
body.android #pactwise-app .imp-hero__btn--wide {
	flex: none;
	min-height: 56px;
	font-size: 17px;
}
body.android #pactwise-app .imp-hero__other {
	align-self: center;
	font-size: 14px;
	font-weight: 600;
}
body.android .imp-hero__who {
	display: flex;
	align-items: center;
	gap: 14px;
}
body.android .imp-hero__who .imp-tile {
	width: 52px;
	height: 52px;
	border-radius: 16px;
	font-size: 22px;
}
body.android .imp-hero__who div {
	display: flex;
	flex-direction: column;
}
body.android .imp-hero__who strong {
	font-size: 24px;
	font-weight: 800;
	line-height: 1.15;
}
body.android .imp-hero__who .imp-muted {
	font-size: 14px;
	font-weight: 600;
}
body.android .imp-hero--free {
	flex-direction: row;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
}
body.android .imp-hero__moon {
	display: grid;
	flex: none;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 14px;
	background: var(--md-surfaceContainerHigh);
	color: var(--md-onSurfaceVariant);
}
body.android .imp-hero--free strong {
	font-size: 15px;
	font-weight: 700;
}
body.android .imp-hero__links {
	display: flex;
	gap: 16px;
	margin-top: 2px;
	font-size: 14px;
	font-weight: 600;
}
body.android #pactwise-app .imp-hero__links .imp-link {
	padding: 0;
	font-size: 14px;
}
body.android .imp-ring--other .imp-ring__tile {
	background: var(--md-surfaceContainerHigh);
	color: var(--md-onSurfaceVariant);
}
body.android #pactwise-app .imp-hero__links :is(a, .imp-link) {
	color: var(--md-primary);
	font-weight: 600;
	text-decoration: none;
}
body.android .imp-pseg__count {
	margin-left: 6px;
	color: var(--md-onSurfaceVariant);
	font-weight: 600;
}
/* (the chip above already names the commitment: only how much work, and +) */
body.android .imp-ptasks .imp-tcol__head h2 {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
body.android .imp-ptasks .imp-tcol__head {
	align-items: center;
	margin-bottom: 8px;
}

/* --- Notes on the phone: a journal ---------------------------------------------------------- */
body.android .imp-pchip--all {
	padding: 0 16px;
	--c: var(--md-primary);
}
body.android .imp-journal {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding-bottom: 12px;
}
body.android .imp-jcap {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 12px 10px 16px;
	border-radius: 22px;
	background: var(--md-surfaceContainerLow);
	box-shadow: inset 0 0 0 1px var(--md-outlineVariant);
	transition: box-shadow 0.18s var(--md-ease);
}
body.android .imp-jcap:focus-within {
	box-shadow: 0 0 0 1px var(--md-primary), 0 0 0 5px color-mix(in srgb, var(--md-primary) 20%, transparent);
}
body.android #pactwise-app .imp-jcap__field,
body.android #pactwise-app .imp-jcap__field:is(:focus, :focus-visible) {
	min-height: 28px;
	padding: 4px 0;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--md-onSurface);
	font-size: 16px;
	line-height: 1.5;
	resize: none;
}
body.android .imp-jcap__bar {
	display: flex;
	align-items: center;
	gap: 8px;
}
body.android #pactwise-app .imp-jcap__who {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
	border-radius: 12px;
	background: color-mix(in srgb, var(--c) 12%, var(--md-surfaceContainerLow));
	color: var(--md-onSurface);
	font-size: 13px;
	font-weight: 600;
}
body.android .imp-jcap__saved {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--md-success, #2e9b5f);
	font-size: 12px;
	font-weight: 600;
}
body.android #pactwise-app .imp-jcap__add {
	margin-left: auto;
	height: 38px;
	padding: 0 18px;
	border: none;
	border-radius: 14px;
	background: var(--md-primary);
	color: var(--md-onPrimary);
	font-size: 14px;
	font-weight: 700;
}
body.android #pactwise-app .imp-jcap__add:disabled {
	opacity: 0.4;
}
body.android .imp-journal__empty {
	margin: 4px 8px;
}
/* the timeline: a line down the left, a dot per day */
body.android .imp-journal__list {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 0 8px;
	padding: 0 0 0 22px;
	list-style: none;
}
body.android .imp-journal__list::before {
	content: "";
	position: absolute;
	top: 10px;
	bottom: 6px;
	left: 5px;
	width: 2px;
	border-radius: 1px;
	background: var(--md-outlineVariant);
}
body.android .imp-journal__day {
	position: relative;
	margin-top: 4px;
	color: color-mix(in srgb, var(--c) 70%, var(--md-onSurface));
	font-size: 13px;
	font-weight: 700;
}
body.android .imp-journal__day::before {
	content: "";
	position: absolute;
	top: 4px;
	left: -22px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: 0 0 0 4px var(--md-surface);
}
body.android .imp-jnote {
	position: relative;
	border-radius: 18px;
	background: color-mix(in srgb, var(--md-success, #2e9b5f) 75%, #000);
	touch-action: pan-y;
}
body.android .imp-jnote__under {
	position: absolute;
	top: 50%;
	left: 16px;
	display: flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	transform: translateY(-50%);
}
body.android .imp-jnote__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 12px 12px 14px;
	border-radius: 18px;
	background: var(--md-surfaceContainerLow);
	transition: transform 0.18s var(--md-ease);
}
body.android .imp-jnote.is-armed .imp-jnote__card {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
body.android .imp-jnote__head {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 28px;
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 700;
}
body.android .imp-jnote__who {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: color-mix(in srgb, var(--c) 65%, var(--md-onSurface));
}
body.android .imp-jnote__who + .imp-jnote__time::before {
	content: "· ";
}
body.android #pactwise-app .imp-jnote__tick {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	min-height: 0;
	margin: -2px -2px -2px auto;
	padding: 0;
	border: 2px solid color-mix(in srgb, var(--c) 60%, var(--md-outlineVariant));
	border-radius: 50%;
	background: transparent;
	color: var(--on-c, #fff);
}
body.android #pactwise-app .imp-jnote__tick.is-done {
	border-color: var(--c);
	background: var(--c);
	color: #fff;
}
body.android .imp-jnote h3 {
	margin: 0;
	padding-right: 4px;
	color: var(--md-onSurface);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
}
body.android .imp-jnote__body {
	color: var(--md-onSurfaceVariant);
	font-size: 14px;
	line-height: 1.5;
}
body.android .imp-jnote__body > :first-child {
	margin-top: 0;
}
body.android .imp-jnote__body > :last-child {
	margin-bottom: 0;
}
body.android .imp-journal__list.is-done .imp-jnote__card {
	opacity: 0.6;
}
body.android .imp-journal__list.is-done h3 {
	text-decoration: line-through;
}
body.android .imp-jnote.is-editing {
	background: none;
}
body.android #pactwise-app .imp-journal__done {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	margin-left: 30px;
	padding: 0 14px;
	border: 1px dashed var(--md-outlineVariant);
	border-radius: 16px;
	background: transparent;
	color: var(--md-onSurfaceVariant);
	font-size: 14px;
	font-weight: 600;
}
body.android #pactwise-app .imp-journal__done > span {
	margin-left: auto;
}

/* A message at the bottom, with Undo */
.imp-snack {
	position: fixed;
	right: 16px;
	bottom: calc(var(--inset-bottom, 0px) + 112px);
	left: 16px;
	z-index: 60;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 8px 0 18px;
	border-radius: 18px;
	background: var(--md-inverseSurface, #2b2840);
	color: var(--md-inverseOnSurface, #f3f1fb);
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	animation: imp-snack-in 0.18s ease-out;
}
.imp-snack span {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
#pactwise-app ~ .imp-snack button,
.imp-snack button {
	height: 40px;
	padding: 0 14px;
	border: none;
	border-radius: 12px;
	background: transparent;
	color: var(--md-inversePrimary, #b9adff);
	font: inherit;
	font-weight: 700;
}
@keyframes imp-snack-in {
	from { opacity: 0; transform: translateY(12px); }
}

/* --- Progress: three numbers, goal bars, days by commitment, done, trend --------------------- */
body.android .imp-pkpis {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 0 0 12px;
}
body.android .imp-pkpi {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px 12px;
	border-radius: 20px;
	background: var(--md-surfaceContainerLow);
}
body.android .imp-pkpi strong {
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.3px;
}
body.android .imp-pkpi span {
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
}
body.android .imp-pgoal {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 12px 0 4px;
	padding: 0;
	list-style: none;
}
body.android .imp-pgoal li {
	display: flex;
	flex-direction: column;
	gap: 7px;
}
body.android .imp-pgoal__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
}
body.android .imp-pgoal__label a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--md-onSurface);
	text-decoration: none;
}
body.android .imp-pgoal__label .imp-muted {
	font-size: 13px;
	font-weight: 600;
}
body.android .imp-pgoal__track {
	position: relative;
	height: 14px;
	border-radius: 7px;
	background: var(--md-surfaceContainerHigh);
}
body.android .imp-pgoal__done {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	border-radius: 7px;
	background: var(--c);
}
body.android .imp-pgoal__plan {
	position: absolute;
	top: 2px;
	bottom: 2px;
	border-radius: 0 6px 6px 0;
	background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 60%, transparent) 0 4px, transparent 4px 8px);
}
body.android .imp-pgoal__tick {
	position: absolute;
	top: -5px;
	bottom: -5px;
	width: 3px;
	margin-left: -1.5px;
	border-radius: 2px;
	background: var(--md-onSurface);
}
body.android .imp-pgoal__note {
	font-size: 12px;
	font-weight: 600;
}
body.android .imp-pgoal__note.is-ok {
	color: var(--md-success, #2e9b5f);
}
body.android .imp-pgoal__note.is-short {
	color: var(--md-warning, #c76b16);
}
body.android .imp-pdays2__row {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	margin: 12px 0 10px;
}
body.android #pactwise-app .imp-pday2 {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-height: 0;
	padding: 8px 0 6px;
	border: none;
	border-radius: 16px;
	background: transparent;
	color: var(--md-onSurface);
}
body.android #pactwise-app .imp-pday2.is-today {
	background: var(--md-surfaceContainerHigh);
}
body.android #pactwise-app .imp-pday2.is-open {
	box-shadow: inset 0 0 0 2px var(--md-primary);
}
body.android .imp-pday2__chart {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
}
body.android .imp-pday2__plan {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 28px;
	border: 1.5px dashed var(--md-outline);
	border-radius: 7px;
	box-sizing: border-box;
	transform: translateX(-50%);
}
body.android .imp-pday2__stack {
	position: relative;
	display: flex;
	flex-direction: column-reverse;
	gap: 2px;
	width: 20px;
}
body.android .imp-pday2__stack span {
	display: block;
	border-radius: 4px;
}
body.android .imp-pday2__wd {
	font-size: 12px;
	font-weight: 700;
}
body.android .imp-pday2__h {
	color: var(--md-onSurfaceVariant);
	font-size: 11px;
	font-weight: 600;
}
body.android .imp-plegend__planned--outline {
	border: 1.5px dashed var(--md-outline);
	background: transparent !important;
}
body.android .imp-pchecked details {
	border-bottom: 1px solid var(--md-outlineVariant);
}
body.android .imp-pchecked details:last-of-type {
	border-bottom: none;
}
body.android .imp-pchecked summary {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	font-size: 15px;
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}
body.android .imp-pchecked summary::-webkit-details-marker {
	display: none;
}
body.android .imp-pchecked summary .imp-muted {
	margin-left: auto;
	font-size: 13px;
}
body.android .imp-pchecked ul {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0 0 0 18px;
	list-style: none;
	font-size: 14px;
}
body.android .imp-pchecked li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}
body.android .imp-pchecked li .imp-muted {
	flex: none;
	font-size: 12px;
}
body.android .imp-ptrend__chart {
	display: block;
	width: 100%;
	height: auto;
	margin-top: 10px;
}
body.android .imp-ptrend__axis {
	stroke: var(--md-outlineVariant);
}
body.android .imp-ptrend__grid {
	stroke: var(--md-outlineVariant);
	stroke-dasharray: 3 4;
}
body.android .imp-ptrend__axislabels {
	display: flex;
	justify-content: space-between;
	margin-top: 4px;
	color: var(--md-onSurfaceVariant);
	font-size: 11px;
	font-weight: 600;
}
body.android .imp-ptrend__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
}
body.android .imp-ptrend__legend > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
/* A day, tapped: a sheet from the bottom */
body.android .imp-psheet__wrap {
	position: fixed;
	inset: 0;
	z-index: 40;
}
body.android .imp-psheet__scrim {
	position: absolute;
	inset: 0;
	background: rgba(5, 4, 12, 0.5);
	animation: imp-fade-in 0.18s ease-out;
}
body.android .imp-psheet {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-height: 80vh;
	overflow-y: auto;
	padding: 10px 20px calc(var(--inset-bottom, 0px) + 24px);
	border-radius: 32px 32px 0 0;
	background: var(--md-surfaceContainerLow);
	outline: none;
	animation: imp-sheet-up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes imp-sheet-up {
	from { transform: translateY(40%); opacity: 0.4; }
}
@keyframes imp-fade-in {
	from { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	body.android :is(.imp-psheet, .imp-psheet__scrim) { animation: none; }
}
body.android .imp-psheet__grip {
	align-self: center;
	width: 40px;
	height: 5px;
	border-radius: 3px;
	background: var(--md-outlineVariant);
}
body.android .imp-psheet__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
body.android .imp-psheet__head h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
}
body.android .imp-psheet__head p {
	margin: 2px 0 0;
	font-weight: 600;
}
body.android .imp-psheet__caption {
	color: var(--md-onSurfaceVariant);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
}
body.android .imp-psheet__sessions ul {
	display: flex;
	flex-direction: column;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}
body.android .imp-psheet__sessions li {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	border-bottom: 1px solid var(--md-outlineVariant);
	font-size: 14px;
}
body.android .imp-psheet__sessions li > span:nth-child(2) {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}
body.android .imp-psheet__sessions li .imp-muted {
	font-size: 12px;
	font-weight: 600;
}
body.android .imp-psheet__bar {
	flex: none;
	width: 8px;
	height: 26px;
	border-radius: 4px;
}

/* Settings: the Pactwise account (encryption, sign out, delete) */
body.android .imp-psync__who {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 18px 4px;
	overflow-wrap: anywhere;
}
body.android .imp-psync__who .imp-muted {
	font-size: 13px;
}
body.android .imp-psync__note {
	margin: 6px 18px;
	font-size: 14px;
	line-height: 1.5;
}
body.android .imp-psync__warn {
	color: var(--md-error, #b3261e);
}
body.android .imp-psync__slot > .imp-muted {
	margin: 4px 18px 8px;
	font-size: 13px;
	line-height: 1.45;
}
body.android .imp-psync__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	padding: 4px 16px 8px;
}
body.android .imp-psync__form input {
	min-width: 0;
	width: auto;
}
body.android .imp-psync__cancel {
	margin: 0 16px 8px;
}
body.android .imp-psync__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 8px 16px 8px;
}
body.android .imp-psync__row .imp-button {
	flex: 1 1 auto;
}

/* The dates in the calendar's bar: tapped, back to today */
body.android .imp-pcal__title {
	padding: 0;
	border: none;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
}
/* Progress, one commitment: its numbers, blocks, forecast and history under the week */
body.android .imp-pprogress > .imp-pchips {
	margin: 0 0 4px;
}
body.android .imp-pfocus {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: none;
}
body.android .imp-pfocus .imp-cpage__stats {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
}
body.android .imp-pfocus .imp-cpage__row,
body.android .imp-pfocus .imp-cpage__section {
	margin: 0;
}
body.android .imp-pgoal__name {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: none;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
}
body.android .imp-pgoal__name:disabled {
	opacity: 1;
}
/* (the composer shows the focus; the field inside needs no second frame) */
body.android #pactwise-app .imp-jcap__field:is(:focus, :focus-visible) {
	outline: none;
	border-color: transparent;
	box-shadow: none;
	background: transparent;
}

/* The app's own dialog, on the phone: a sheet from the bottom, the phone's colours */
body.android #pactwise-app .imp-ask {
	align-items: end;
	padding: 0;
}
body.android #pactwise-app .imp-ask__card {
	width: 100%;
	padding: 24px 22px calc(var(--inset-bottom, 0px) + 22px);
	border-radius: 28px 28px 0 0;
	background: var(--md-surfaceContainerLow);
	color: var(--md-onSurface);
	animation: imp-sheet-up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.android #pactwise-app .imp-ask__input {
	height: 52px;
	background: var(--md-surfaceContainer, var(--md-surfaceContainerHigh));
}
body.android #pactwise-app .imp-ask__actions {
	flex-direction: column-reverse;
	align-items: stretch;
}
body.android #pactwise-app .imp-ask__actions .imp-button {
	min-height: 48px;
	justify-content: center;
}

/* "Account and sync": the not-signed-in text, notifications, exact reminders */
body.android .imp-psync > p.imp-muted {
	margin: 2px 18px 6px;
	font-size: 14px;
	line-height: 1.5;
}
body.android .imp-pnotify > h2 {
	margin: 10px 18px 2px;
	font-size: 16px;
	font-weight: 700;
}
body.android .imp-pnotify__exact {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px 8px 18px;
	border-top: 1px solid var(--md-outlineVariant, rgba(0, 0, 0, 0.08));
}
body.android .imp-pnotify__exact > span {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
body.android .imp-pnotify__exact .imp-muted {
	font-size: 12px;
	line-height: 1.45;
}
body.android .imp-pnotify__exact .imp-button {
	flex: none;
}

/* --- templates, Plan the week, the weekly nudge, quick add ----------------------- */

body.android .imp-empty--start .imp-tpl {
	width: 100%;
	grid-template-columns: minmax(0, 1fr);
}
body.android #pactwise-app .imp-tpl__card,
body.android .imp-plan__card {
	border: 0;
	border-radius: 20px;
	background: var(--md-surfaceContainerLow);
	box-shadow: none;
}
body.android .imp-plan {
	gap: 12px;
	padding: 0 16px 24px;
}
body.android .imp-plan__weeks {
	background: var(--md-surfaceContainerHigh);
}
body.android #pactwise-app .imp-plan__weeks button[aria-pressed="true"] {
	background: var(--md-secondaryContainer);
	color: var(--md-onSecondaryContainer);
	box-shadow: none;
}
body.android .imp-plan__card,
body.android .imp-plan__chips .imp-plan__goal {
	border-radius: 20px;
	background: var(--md-surfaceContainerLow);
	box-shadow: none;
}
body.android .imp-plan__bar {
	background: var(--md-surfaceContainerHighest);
}
body.android .imp-plan__days .imp-plan__sug {
	background: color-mix(in srgb, var(--c) 14%, var(--md-surfaceContainerLow));
	min-height: 56px;
}
body.android .imp-plan__foot {
	background: linear-gradient(to top, var(--md-surface) 75%, transparent);
}
body.android #pactwise-app .imp-field--time input {
	background: var(--md-surfaceContainerHigh);
	border-color: transparent;
}
body.android .imp-nudge {
	margin: 0 16px 12px;
	background: var(--md-primaryContainer);
	color: var(--md-onPrimaryContainer);
}
body.android .imp-nudge__text span {
	color: inherit;
	opacity: 0.8;
}
body.android .imp-nudge__icon {
	background: var(--md-surface);
	color: var(--md-primary);
}
body.android #pactwise-app .imp-cap__chip {
	min-height: 40px;
	border-color: var(--md-outlineVariant);
}
body.android #pactwise-app .imp-cap__chip[aria-checked="true"] {
	border-color: transparent;
	background: var(--md-secondaryContainer);
	color: var(--md-onSecondaryContainer);
}
body.android #pactwise-app .imp-empty--start .imp-tpl__card {
	border: 1px solid var(--md-outlineVariant);
	background: var(--md-surface);
}
