/* SmartKarte owner dashboard (https://smartkarte.ch/konto/). Phone first; on a computer the screens sit in a
   centred column. Colours and sizes follow the approved owner app designs. */

:root {
	--bg: #f4f5f7;
	--text: #1f2937;
	--muted: #6b7280;
	--faint: #9ca3af;
	--line: #e7e9ee;
	--line-in: #eef0f3;
	--field: #c9ccd2;
	--card: #ffffff;
	--primary: #0f766e;
	--primary-dark: #0d5f59;
	--primary-soft: #e6f4f1;
	--amber: #b45309;
	--amber-dark: #7c3d06;
	--amber-soft: #fff7e6;
	--amber-line: #f5dfb3;
	--red: #b91c1c;
	--red-soft: #fdecec;
	--green: #16a34a;
	--req: #f87171;
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--safe-b: env(safe-area-inset-bottom);
	--safe-t: env(safe-area-inset-top);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}

a {
	color: var(--primary);
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	cursor: pointer;
}

h1,
h2,
h3,
p {
	margin: 0;
}

[hidden] {
	display: none !important;
}

.sk-app {
	position: relative;
	display: flex;
	flex-direction: column;
	max-width: 520px;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 auto;
	padding-top: var(--safe-t);
}

.sk-app.has-tabs {
	padding-bottom: calc(64px + var(--safe-b));
}

.sk-screen {
	display: flex;
	flex: 1;
	flex-direction: column;
	animation: sk-in 0.25s var(--ease);
}

@keyframes sk-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

/* ---------- Top bar ---------- */

.top {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	padding: 12px 20px 8px;
}

.top h1 {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font-size: 20px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.top-back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-left: -12px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--text);
}

.top-action {
	padding: 10px 0 10px 12px;
	border: 0;
	background: none;
	color: var(--primary);
	font-size: 15px;
	font-weight: 700;
}

.top-action:disabled {
	color: var(--faint);
}

.top-note {
	font-size: 13px;
	color: var(--muted);
}

.intro {
	margin: 0 20px 12px;
	font-size: 14px;
	color: var(--muted);
}

/* ---------- Bands, sections, rows ---------- */

.band {
	margin-top: 12px;
	padding: 20px;
	background: var(--card);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.band.first {
	margin-top: 4px;
}

.band.flush {
	padding: 0;
}

.band.amber {
	background: var(--amber-soft);
	border-color: var(--amber-line);
	color: var(--amber-dark);
}

.band + .band.tight {
	margin-top: 0;
	border-top: 0;
}

.sec-title {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

.band.flush > .sec-title {
	margin: 0;
	padding: 16px 20px 8px;
}

.divider {
	margin: 16px 0;
	border-top: 1px solid var(--line-in);
}

.hint {
	margin-top: 12px;
	font-size: 13px;
	color: var(--muted);
}

.row {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 64px;
	padding: 0 20px;
	border: 0;
	border-top: 1px solid var(--line-in);
	background: none;
	color: var(--text);
	text-align: left;
}

.row:first-child,
.sec-title + .row {
	border-top: 0;
}

.row.small {
	min-height: 56px;
}

.row.danger {
	color: var(--red);
}

.row-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--primary-soft);
	color: var(--primary);
	overflow: hidden;
}

.row-text {
	flex: 1;
	min-width: 0;
}

.row-title {
	display: block;
	font-weight: 600;
}

.row-sub {
	display: block;
	font-size: 13px;
	color: var(--muted);
}

.row-sub.warn {
	color: var(--amber);
}

.row-sub.bad {
	color: var(--red);
}

.row-value {
	font-size: 14px;
	color: var(--muted);
	white-space: nowrap;
}

.chev {
	flex: none;
	color: var(--faint);
}

.badge {
	flex: none;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--amber-soft);
	color: var(--amber);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.badge.green {
	background: var(--primary-soft);
	color: var(--primary);
}

.badge.grey {
	background: var(--line-in);
	color: var(--text);
}

.link-row {
	display: block;
	width: 100%;
	padding: 14px 20px;
	border: 0;
	border-top: 1px solid var(--line-in);
	background: none;
	color: var(--primary);
	font-weight: 700;
	text-align: left;
}

.plain-link {
	padding: 16px 20px;
	border: 0;
	background: none;
	color: var(--primary);
	font-weight: 700;
	text-align: left;
}

.danger-link {
	margin: 24px 20px 32px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--red);
	font-weight: 600;
	text-align: left;
}

/* ---------- Fields: label on the top border, no example text inside ---------- */

.f {
	position: relative;
	margin-bottom: 16px;
}

.f:last-child {
	margin-bottom: 0;
}

/* Texts per language sit in their own wrapper: keep the space between them. */
[data-lang] > .f:last-child {
	margin-bottom: 16px;
}

.sheet-body [data-lang]:last-of-type > .f:last-child {
	margin-bottom: 0;
}

.f > label,
.f > .f-label {
	position: absolute;
	top: -8px;
	left: 10px;
	z-index: 1;
	padding: 0 4px;
	background: var(--card);
	font-size: 12px;
	line-height: 16px;
	color: var(--muted);
	pointer-events: none;
}

.req {
	margin-left: 2px;
	color: var(--req);
}

.f input,
.f textarea {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--field);
	border-radius: 10px;
	background: var(--card);
	color: var(--text);
	font: inherit;
	font-size: 16px; /* 16 px stops iPhones from zooming in */
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.f textarea {
	height: auto;
	min-height: 96px;
	padding: 14px;
	resize: vertical;
}

.f textarea.tall {
	min-height: 260px;
}

.f input:focus,
.f textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 1px var(--primary);
}

.f.has-prefix input {
	padding-left: 52px;
}

.f.wide-prefix input {
	padding-left: 124px;
}

.f-prefix {
	position: absolute;
	top: 0;
	left: 14px;
	display: flex;
	align-items: center;
	height: 48px;
	font-size: 16px;
	color: var(--muted);
	pointer-events: none;
}

.f.has-suffix input {
	padding-right: 44px;
}

.f-suffix {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 48px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--faint);
}

.grid-2 {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
}

.grid-zip {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: 12px;
}

.grid-zip .f {
	margin-bottom: 0;
}

.count {
	margin-top: 8px;
	font-size: 13px;
	color: var(--muted);
}

.count.over {
	color: var(--red);
	font-weight: 600;
}

.suggest {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.suggest:not(:empty) {
	margin-top: 12px;
}

/* Fields after the postcode / town row keep the normal 16px gap. */
.suggest + .f,
.suggest + .dd {
	margin-top: 16px;
}

/* ---------- Custom dropdown: chevron 16 px from the right, 48 px right padding ---------- */

.dd {
	position: relative;
	margin-bottom: 16px;
}

.dd-button {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	height: 48px;
	padding: 0 48px 0 14px;
	border: 1px solid var(--field);
	border-radius: 10px;
	background: var(--card);
	font-size: 16px;
	text-align: left;
}

.dd-button span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dd-button .dd-chev {
	position: absolute;
	top: 20px;
	right: 16px;
	transition: transform 0.25s var(--ease);
}

.dd.is-open .dd-chev {
	transform: rotate(180deg);
}

.dd-list {
	position: absolute;
	top: 54px;
	right: 0;
	left: 0;
	z-index: 40;
	max-height: 300px;
	padding: 6px;
	overflow-y: auto;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--card);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.2s ease, transform 0.24s var(--ease), visibility 0.24s;
}

.dd.is-open .dd-list {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.dd-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 44px;
	padding: 0 12px;
	border: 0;
	border-radius: 8px;
	background: none;
	text-align: left;
}

.dd-option.is-on {
	background: #f3f4f6;
	font-weight: 600;
}

.dd-option small {
	font-size: 13px;
	color: var(--muted);
}

/* ---------- Segmented control with a sliding thumb ---------- */

.seg {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--n), minmax(0, 1fr));
	width: 100%;
	padding: 3px;
	border-radius: 12px;
	background: #e6e8ec;
}

.seg.inline {
	display: inline-grid;
	width: auto;
	min-width: calc(var(--n) * 64px);
}

.seg-thumb {
	position: absolute;
	top: 3px;
	bottom: 3px;
	left: 3px;
	width: calc((100% - 6px) / var(--n));
	border-radius: 9px;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	transform: translateX(calc(var(--i) * 100%));
	transition: transform 0.3s var(--ease);
}

.seg button {
	position: relative;
	z-index: 1;
	min-height: 36px;
	padding: 6px 8px;
	border: 0;
	background: none;
	color: var(--muted);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	overflow-wrap: anywhere;
	transition: color 0.2s ease;
}

.seg button[aria-pressed="true"] {
	color: var(--text);
}

/* ---------- Switch ---------- */

.switch {
	position: relative;
	flex: none;
	width: 46px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #d4d7dd;
	transition: background-color 0.25s ease;
}

.switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
	transition: transform 0.25s var(--ease);
}

.switch[aria-checked="true"] {
	background: var(--primary);
}

.switch[aria-checked="true"]::after {
	transform: translateX(18px);
}

.switch-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-height: 32px;
}

/* ---------- Chips ---------- */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 34px;
	padding: 0 14px;
	border: 1px solid #dfe2e7;
	border-radius: 999px;
	background: #ffffff;
	color: var(--text);
	font-size: 13px;
	font-weight: 600;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip.big {
	height: 40px;
	font-size: 14px;
}

.chip[aria-pressed="true"] {
	border-color: var(--primary-soft);
	background: var(--primary-soft);
	color: var(--primary);
}

.chip.big[aria-pressed="true"] {
	border-color: var(--primary);
}

.chip.veg[aria-pressed="true"] {
	border-color: #ecfdf3;
	background: #ecfdf3;
	color: #166534;
}

.flag {
	display: inline-flex;
	flex: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	overflow: hidden;
}

.flag svg {
	width: 100%;
	height: 100%;
}

/* ---------- Buttons ---------- */

.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 52px;
	padding: 0 20px;
	border: 0;
	border-radius: 14px;
	background: var(--primary);
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn:active {
	background: var(--primary-dark);
}

.btn:disabled {
	opacity: 0.5;
}

.btn.sec {
	border: 1px solid var(--primary);
	background: transparent;
	color: var(--primary);
}

.btn.amber {
	border: 1px solid var(--amber);
	background: transparent;
	color: var(--amber);
}

.btn.red {
	background: var(--red);
}

.btn + .btn {
	margin-top: 12px;
}

.btn-row {
	display: flex;
	gap: 10px;
}

.btn-row .btn {
	height: 46px;
	margin: 0;
	border-radius: 12px;
	font-size: 15px;
}

.bottom {
	position: sticky;
	bottom: 0;
	z-index: 10;
	margin-top: auto;
	padding: 12px 20px calc(20px + var(--safe-b));
	background: var(--bg);
}

.has-tabs .bottom {
	bottom: calc(64px + var(--safe-b));
	padding-bottom: 12px;
}

.bottom-note {
	margin: 14px 20px 0;
	font-size: 13px;
	color: var(--muted);
}

.spin {
	width: 18px;
	height: 18px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: sk-spin 0.7s linear infinite;
}

@keyframes sk-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Tab bar ---------- */

.tabbar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 30;
	display: flex;
	justify-content: center;
	padding-bottom: var(--safe-b);
	background: #ffffff;
	border-top: 1px solid var(--line);
}

.tabbar-inner {
	display: flex;
	width: 100%;
	max-width: 520px;
}

.tab {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-height: 64px;
	padding-top: 9px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	transition: color 0.2s ease;
}

.tab.is-on {
	color: var(--primary);
}

/* ---------- Home ---------- */

.home-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 20px 8px;
}

.logo {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 30%;
	background: var(--text);
	color: #ffffff;
	font-size: 22px;
	font-weight: 700;
	object-fit: cover;
	overflow: hidden;
}

.logo.big {
	width: 56px;
	height: 56px;
	background: var(--primary);
	font-size: 26px;
}

.home-head h1 {
	font-size: 20px;
	font-weight: 700;
}

.home-head p {
	font-size: 13px;
	color: var(--muted);
}

.pill {
	display: inline-flex;
	align-items: center;
	height: 34px;
	padding: 0 14px;
	border: 0;
	border-radius: 999px;
	background: var(--primary-soft);
	color: var(--primary);
	font-size: 13px;
	font-weight: 700;
}

.status {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	font-weight: 700;
}

.dot {
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #d4d7dd;
}

.dot.live {
	background: var(--green);
}

.status-sub {
	margin-top: 4px;
	font-size: 13px;
	color: var(--muted);
}

.status-link {
	display: block;
	margin-top: 8px;
	font-size: 14px;
	font-weight: 600;
	word-break: break-all;
}

.stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--line-in);
}

.stats.center {
	text-align: center;
}

.stat-n {
	font-size: 22px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.stat-l {
	font-size: 12px;
	color: var(--muted);
}

.tile-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #ffffff;
	color: var(--amber);
}

/* ---------- Menu lists, dishes, drag handles ---------- */

.handle {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 44px;
	margin-left: -8px;
	color: #b6bac2;
	cursor: grab;
	touch-action: none;
}

.sortable > .is-dragging {
	position: relative;
	z-index: 5;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sortable > * {
	transition: transform 0.2s var(--ease);
}

.sortable > .is-dragging {
	transition: none;
}

.dish {
	display: flex;
	gap: 12px;
	width: 100%;
	padding: 14px 20px 14px 17px;
	border: 0;
	border-top: 1px solid var(--line-in);
	border-left: 3px solid transparent;
	background: #ffffff;
	color: var(--text);
	text-align: left;
}

.dish.is-unsure {
	border-left-color: #d97706;
	background: #fffbf0;
}

.dish-text {
	flex: 1;
	min-width: 0;
}

.dish-name {
	font-weight: 700;
}

.dish-sub {
	font-size: 13px;
	color: var(--muted);
}

.dish-warn {
	margin-top: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--amber);
}

.dish-prices {
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.cat-title {
	padding: 14px 20px 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

.list-row {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 60px;
	padding: 0 20px;
	border-top: 1px solid var(--line-in);
	background: #ffffff;
}

.list-row:first-child,
.sec-title + .list-row {
	border-top: 0;
}

.list-row .row-text {
	padding: 10px 0;
	border: 0;
	background: none;
	text-align: left;
}

.list-row.is-off .row-title {
	color: var(--faint);
}

.thumb {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 52px;
	border-radius: 10px;
	background: var(--line-in);
	color: var(--faint);
	object-fit: cover;
	overflow: hidden;
}

/* Price rows on the dish screen */

.price-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 130px 36px;
	gap: 10px;
	align-items: start;
	margin-bottom: 16px;
}

.price-row .f {
	margin-bottom: 0;
}

.price-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 48px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--faint);
}

.price-row.single {
	grid-template-columns: minmax(0, 1fr);
}

/* Stepper */

.stepper {
	display: flex;
	align-items: center;
	gap: 4px;
}

.stepper button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid #dfe2e7;
	border-radius: 12px;
	background: #ffffff;
	font-size: 20px;
}

.stepper button:disabled {
	color: var(--faint);
}

.stepper-value {
	min-width: 86px;
	font-weight: 700;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* ---------- Horizontal rows: first snaps to the start, last to the end, others to the middle;
   edge to edge on the phone ---------- */

.hrow {
	display: flex;
	gap: 10px;
	padding: 0 20px;
	overflow-x: auto;
	scroll-padding-inline: 20px;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.hrow::-webkit-scrollbar {
	display: none;
}

.hrow > * {
	flex: none;
	scroll-snap-align: center;
}

.hrow > :first-child {
	scroll-snap-align: start;
}

.hrow > :last-child {
	scroll-snap-align: end;
}

.hrow > p {
	flex: 1 1 100%;
	min-width: 0;
}

.page-thumb {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 104px;
	height: 136px;
	border-radius: 12px;
	background: #e6e8ec;
	color: var(--muted);
	font-size: 12px;
	overflow: hidden;
}

.page-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.page-thumb .spin {
	position: relative;
	color: var(--primary);
}

.page-remove {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(17, 24, 39, 0.7);
	color: #ffffff;
}

.add-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	padding: 12px 20px 0;
	border-top: 1px solid var(--line-in);
	color: var(--primary);
	font-weight: 600;
	cursor: pointer;
}

.file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* Design cards */

.design-card {
	width: 132px;
	padding: 0;
	border: 0;
	background: none;
	text-align: center;
}

.design-frame {
	height: 200px;
	overflow: hidden;
	border: 1px solid #dfe2e7;
	border-radius: 14px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.design-card[aria-pressed="true"] .design-frame {
	border-color: var(--primary);
	box-shadow: 0 0 0 1px var(--primary);
}

.design-frame-head {
	height: 46px;
	padding: 10px;
}

.design-frame-head span {
	display: block;
	width: 54px;
	height: 9px;
	border-radius: 4px;
}

.design-frame-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
}

.design-frame-body span {
	display: block;
	height: 8px;
	border-radius: 4px;
}

.design-name {
	display: block;
	margin-top: 8px;
	font-size: 14px;
}

.design-card[aria-pressed="true"] .design-name {
	font-weight: 700;
	color: var(--primary);
}

.swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.swatch {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	transition: box-shadow 0.2s ease;
}

.swatch[aria-pressed="true"] {
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--c);
}

/* QR */

.qr {
	display: block;
	width: 200px;
	height: 200px;
	margin: 0 auto;
}

.qr-code {
	margin-top: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-align: center;
}

.qr-url {
	margin-top: 2px;
	font-size: 13px;
	color: var(--muted);
	text-align: center;
	word-break: break-all;
}

/* Sign-up, set-up */

.hero {
	padding: 56px 20px 0;
}

.hero h1 {
	margin-top: 24px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

.hero p {
	margin-top: 10px;
	color: var(--muted);
}

.hero p b {
	color: var(--text);
	font-weight: 600;
}

.hero .who {
	margin-top: 14px;
	font-weight: 600;
	color: var(--text);
	overflow-wrap: anywhere;
}

/* Round-cornered icon above a message (e-mail sent, link expired). */
.state-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 30%;
	background: var(--primary-soft);
	color: var(--primary);
}

.state-icon.amber {
	background: var(--amber-soft);
	color: var(--amber);
}

.below {
	padding: 20px 20px 0;
}

.foot-link {
	margin-top: auto;
	padding: 24px 20px calc(34px + var(--safe-b));
	font-size: 14px;
	color: var(--muted);
	text-align: center;
}

/* Dashboard language on the log-in screens, below the last link. */
.foot-link:has(+ .ui-langs) {
	padding-bottom: 14px;
}

.ui-langs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
	padding: 0 20px calc(28px + var(--safe-b));
	font-size: 13px;
	color: var(--muted);
}

.ui-langs b {
	color: var(--text);
	font-weight: 600;
}

.ui-langs button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--muted);
	font: inherit;
	cursor: pointer;
}

.ui-langs button:hover {
	color: var(--primary);
}

.foot-link a,
.foot-link button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--primary);
	font-weight: 700;
}

.steps-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	padding: 20px 20px 0;
}

.stepdots {
	display: flex;
	gap: 6px;
}

.stepdots span {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: #d4d7dd;
	transition: width 0.3s var(--ease);
}

.stepdots span.on {
	background: var(--primary);
}

.stepdots span.now {
	width: 28px;
}

.page-title {
	margin: 18px 20px 0;
	font-size: 26px;
	font-weight: 700;
}

.page-sub {
	margin: 8px 20px 0;
	color: var(--muted);
}

.big-row {
	min-height: 84px;
	gap: 16px;
}

.big-row .row-icon {
	width: 48px;
	height: 48px;
	border-radius: 14px;
}

.big-row .row-title {
	font-size: 16px;
	font-weight: 700;
}

/* Import progress */

.progress-head {
	padding: 28px 20px 8px;
	text-align: center;
}

.big-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: 0 auto 16px;
	border-radius: 22px;
	background: var(--primary-soft);
	color: var(--primary);
}

.big-icon.red {
	background: var(--red-soft);
	color: var(--red);
}

.big-icon.amber {
	background: var(--amber-soft);
	color: var(--amber);
}

.progress-head h2,
.state h2 {
	font-size: 22px;
	font-weight: 700;
}

.progress-head p,
.state p {
	margin-top: 6px;
	color: var(--muted);
}

.step {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 14px 0;
}

.step + .step {
	border-top: 1px solid var(--line-in);
}

.step-dot {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 2px solid #d4d7dd;
	border-radius: 50%;
}

.step.done .step-dot {
	border: 0;
	background: var(--primary);
	color: #ffffff;
}

.step.now .step-dot {
	border: 3px solid var(--primary-soft);
	border-top-color: var(--primary);
	animation: sk-spin 0.9s linear infinite;
}

.step-title {
	font-weight: 600;
}

.step.next .step-title {
	color: var(--faint);
}

.step-sub {
	font-size: 13px;
	color: var(--muted);
}

.state {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px 32px 40px;
	text-align: center;
}

.tips {
	margin: 0;
	padding-left: 18px;
	color: #4b5563;
	font-size: 14px;
	line-height: 1.7;
}

/* Pro */

.pro-hero {
	margin-top: 4px;
	padding: 24px 20px;
	background: var(--primary);
	color: #ffffff;
}

.pro-hero small {
	font-size: 14px;
	opacity: 0.85;
}

.pro-price {
	margin-top: 6px;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.1;
}

.pro-price span {
	font-size: 16px;
	font-weight: 500;
	opacity: 0.85;
}

.pro-hero .seg {
	margin-top: 18px;
	background: rgba(255, 255, 255, 0.16);
}

.pro-hero .seg button {
	color: #ffffff;
}

.pro-hero .seg button[aria-pressed="true"] {
	color: var(--primary);
}

.pro-gift {
	display: flex;
	gap: 10px;
	align-items: center;
	margin: 16px 0 0;
	font-size: 14px;
	font-weight: 600;
}

.pro-gift[hidden] {
	display: none;
}

.state .spin {
	width: 28px;
	height: 28px;
	margin: 0 auto 18px;
	border-width: 3px;
	color: var(--primary);
}

.cmp {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 72px 72px;
	align-items: center;
	min-height: 48px;
	padding: 0 20px;
	border-top: 1px solid var(--line-in);
	font-size: 14px;
}

.cmp.head {
	min-height: 0;
	padding-top: 14px;
	padding-bottom: 8px;
	border-top: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

.cmp > span + span {
	text-align: center;
	font-size: 13px;
	font-weight: 600;
}

.cmp .no {
	display: inline-block;
	width: 12px;
	height: 2px;
	background: var(--field);
	vertical-align: middle;
}

/* ---------- Bottom sheet ---------- */

.sheet-backdrop {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(17, 24, 39, 0.4);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.sheet-backdrop.is-open {
	opacity: 1;
}

.sheet {
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	padding: 8px 20px calc(20px + var(--safe-b));
	overflow-y: auto;
	border-radius: 20px 20px 0 0;
	background: #ffffff;
	transform: translateY(100%);
	transition: transform 0.32s var(--ease);
}

.sheet-backdrop.is-open .sheet {
	transform: none;
}

.sheet-grip {
	width: 40px;
	height: 5px;
	margin: 0 auto 14px;
	border-radius: 999px;
	background: #d4d7dd;
}

.sheet h2 {
	margin-bottom: 6px;
	font-size: 20px;
	font-weight: 700;
}

.sheet p.sheet-text {
	margin-bottom: 20px;
	color: var(--muted);
}

.sheet-body {
	padding-top: 14px;
}

.sheet .btn {
	margin-top: 20px;
}

.sheet .btn + .btn {
	margin-top: 12px;
}

.sheet .row {
	padding: 0;
}

.check {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1.5px solid var(--field);
	border-radius: 6px;
	color: #ffffff;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

[aria-checked="true"] > .check {
	border-color: var(--primary);
	background: var(--primary);
}

.check svg {
	opacity: 0;
	transition: opacity 0.15s ease;
}

[aria-checked="true"] > .check svg {
	opacity: 1;
}

/* Preview rows of "Change prices" */

.pv {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 12px;
	align-items: center;
	min-height: 52px;
	padding: 0 20px;
	border-top: 1px solid var(--line-in);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.pv-old {
	color: var(--faint);
	text-decoration: line-through;
}

.pv-new {
	font-weight: 700;
}

.pv-new.up {
	color: var(--primary);
}

.pv-new.down {
	color: var(--red);
}

.search {
	position: relative;
}

.search svg {
	position: absolute;
	top: 15px;
	left: 14px;
	color: var(--faint);
	pointer-events: none;
}

.search input {
	padding-left: 42px;
}

/* ---------- Toast ---------- */

.sk-toast {
	position: fixed;
	right: 20px;
	bottom: calc(84px + var(--safe-b));
	left: 20px;
	z-index: 80;
	max-width: 480px;
	margin: 0 auto;
	padding: 14px 16px;
	border-radius: 12px;
	background: #1f2937;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.3s var(--ease), visibility 0.3s;
}

.sk-toast.is-on {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.sk-toast.bad {
	background: var(--red);
}

.loading {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	color: var(--primary);
}

.loading .spin {
	width: 28px;
	height: 28px;
	border-width: 3px;
}

/* ---------- Computer: complete boxes with all four sides; on the phone they stay full width ---------- */

@media (min-width: 600px) {
	.sk-app {
		max-width: 560px;
	}

	.tabbar-inner,
	.sheet {
		max-width: 560px;
	}

	.band {
		margin-right: 20px;
		margin-left: 20px;
		border-right: 1px solid var(--line);
		border-left: 1px solid var(--line);
		border-radius: 16px;
	}

	.band.amber {
		border-color: var(--amber-line);
	}

	/* Round corners also for the rows inside; boxes with a dropdown keep it visible. */
	.band:not(:has(.dd)) {
		overflow: hidden;
	}

	.pro-hero {
		margin: 4px 20px 0;
		border-radius: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
