/*!
 * @Rank – CSS Shape / Border-Radius Generator: the tool's own rules.
 *
 * The palette, header, cards, buttons, notices and toast all come from
 * assets/css/atrank-core.css. Only what is specific to this tool is here, and
 * every rule is anchored on .atrank-shape.
 *
 * .atrank-shape-preview carries no radius of its own — it is set from the
 * script, from the exact same value the CSS panel prints as text.
 */

.atrank-shape .atrank-shape-panes {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	align-items: start;
}
@media (min-width: 900px) {
	.atrank-shape .atrank-shape-panes {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
}
.atrank-shape .atrank-shape-col {
	display: grid;
	gap: 10px;
	min-width: 0;
	align-content: start;
}

.atrank-shape .atrank-cardhead {
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
}

/* ── Mode tabs ────────────────────────────────────────────────────────── */
.atrank-shape .atrank-shape-modetabs {
	display: flex;
	gap: 4px;
}
.atrank-shape .atrank-shape-modetab {
	appearance: none;
	border: 1px solid transparent;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 11px;
	border-radius: var(--r);
	cursor: pointer;
	transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.atrank-shape .atrank-shape-modetab:hover {
	color: var(--accent);
	background: var(--hover);
}
.atrank-shape .atrank-shape-modetab.is-on {
	color: var(--on-accent);
	background: var(--accent);
	border-color: var(--accent);
}
.atrank-shape .atrank-shape-modetab:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

/* ── Fields ───────────────────────────────────────────────────────────── */
.atrank-shape .atrank-shape-field {
	display: block;
}
.atrank-shape .atrank-shape-label {
	display: block;
	margin-bottom: 4px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
}
.atrank-shape .atrank-shape-row2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 10px;
	align-items: end;
}
.atrank-shape .atrank-shape-text,
.atrank-shape .atrank-shape-select {
	display: block;
	width: 100%;
	min-width: 0;
	font: inherit;
	font-size: 13px;
	color: var(--txt);
	padding: 6px 9px;
	border: 1px solid var(--line2);
	border-radius: var(--r);
	background: var(--panel);
	box-shadow: var(--field-inset);
}
.atrank-shape .atrank-shape-text:focus-visible,
.atrank-shape .atrank-shape-select:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

/* ── Corner sliders ───────────────────────────────────────────────────── */
.atrank-shape .atrank-shape-cfields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.atrank-shape .atrank-shape-blobfields {
	display: grid;
	gap: 10px;
}
.atrank-shape .atrank-shape-axisgroup {
	padding-top: 8px;
	border-top: 1px solid var(--line);
}
.atrank-shape .atrank-shape-axisgroup:first-child {
	padding-top: 0;
	border-top: none;
}
.atrank-shape .atrank-shape-axistitle {
	margin-bottom: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--dim);
}
.atrank-shape .atrank-shape-axisgroup .atrank-shape-cfields {
	margin-bottom: 0;
}
.atrank-shape .atrank-shape-cfield {
	display: block;
}
.atrank-shape .atrank-shape-clabel {
	display: block;
	margin-bottom: 3px;
	font-size: 10.5px;
	font-weight: 600;
	color: var(--muted);
}
.atrank-shape .atrank-shape-crow {
	display: flex;
	align-items: center;
	gap: 6px;
}
.atrank-shape .atrank-shape-cslider {
	flex: 1 1 auto;
	min-width: 0;
	accent-color: var(--accent);
}
.atrank-shape .atrank-shape-cnumber {
	flex: 0 0 auto;
	width: 3.6em;
	font: inherit;
	font-size: 12px;
	color: var(--txt);
	padding: 4px 6px;
	border: 1px solid var(--line2);
	border-radius: var(--r);
	background: var(--panel);
	box-shadow: var(--field-inset);
}
.atrank-shape .atrank-shape-cslider:focus-visible,
.atrank-shape .atrank-shape-cnumber:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

/* ── Presets ──────────────────────────────────────────────────────────── */
.atrank-shape .atrank-shape-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.atrank-shape .atrank-shape-preset {
	padding: 4px 10px;
	border: 1px solid var(--line2);
	border-radius: 20px;
	background: var(--panel);
	color: var(--muted);
	font: inherit;
	font-size: 11.5px;
	cursor: pointer;
	transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.atrank-shape .atrank-shape-preset:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.atrank-shape .atrank-shape-preset:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

/* ── Preview ──────────────────────────────────────────────────────────── */
.atrank-shape .atrank-shape-previewarea {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
	padding: 20px;
	border-radius: var(--r-lg);
	border: 1px solid var(--line);
	background: var(--inset);
	margin-bottom: 10px;
}
.atrank-shape .atrank-shape-preview {
	width: 180px;
	height: 180px;
	background: var(--accent);
}

/* ── Code ─────────────────────────────────────────────────────────────── */
.atrank-shape .atrank-shape-code {
	margin: 0;
	padding: 9px 11px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--inset);
	color: var(--txt);
	font-family: var(--mono);
	font-size: 12px;
	line-height: 1.55;
	white-space: pre;
	overflow-x: auto;
}

/* ── Narrow ───────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
	.atrank-shape .atrank-shape-row2 {
		grid-template-columns: 1fr;
	}
	.atrank-shape .atrank-shape-cfields {
		grid-template-columns: 1fr;
	}
}
