/* Kobutori Next: one stylesheet. Tokens lifted from docs/design/previews/h-final.html (operator-approved).
   Fonts: Inter + BIZ UDPGothic, self-hosted (public/fonts/README.md). No inline styles anywhere (CSP style-src 'self'). */
@font-face {
	font-family: "Inter";
	src: url("/fonts/InterVariable.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}
@font-face {
	font-family: "BIZ UDPGothic";
	src: url("/fonts/BIZUDPGothic-Regular.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "BIZ UDPGothic";
	src: url("/fonts/BIZUDPGothic-Bold.woff2") format("woff2");
	font-weight: 700 800;
	font-display: swap;
}
/* ================= Kobutori design tokens (from h-final.html) ================= */
:root {
	color-scheme: light;
	/* type */
	--font-ui: "Inter", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
	--font-logo-kana: "BIZ UDPGothic", "Hiragino Sans", sans-serif;
	--font-logo-latin: "Inter", "Helvetica Neue", Arial, sans-serif;
	--text-xs: 11.5px;
	--text-sm: 12.5px;
	--text-md: 14px;
	--text-lg: 16px;
	--text-xl: 20px;
	--text-2xl: 24px;
	--text-num-md: 21px;
	--text-num-lg: 28px;
	--text-num-xl: 46px;
	--weight-regular: 400;
	--weight-medium: 500;
	--weight-semibold: 600;
	--weight-bold: 700;
	--leading-tight: 1.1;
	--leading-body: 1.5;
	--tracking-num: -0.02em;
	/* shape + space */
	--radius-xs: 6px;
	--radius-sm: 9px;
	--radius-md: 12px;
	--radius-lg: 18px;
	--radius-xl: 24px;
	--radius-pill: 99px;
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	/* colour + elevation: light */
	--color-brand: #f26a0f;
	--color-brand-hi: #ff8a3a;
	--color-brand-deep: #d9540a;
	--color-brand-ink: #a53b05;
	--color-brand-tint: #fff1e6;
	--color-brand-tint-2: #ffdfc4;
	--color-brand-fill-top: #f8771f;
	--color-brand-fill-bottom: #ee6409;
	--color-brand-border: #d9540a;
	--color-brand-wash-top: #fff6ee;
	--color-brand-wash-bottom: #ffeedf;
	--color-on-brand: #121c3d;
	--brand-rgb: 242, 106, 15;
	--color-partner-deep: #121c3d;
	--color-partner-deep-2: #1b2955;
	--color-partner-hi: #263872;
	--color-partner: #30498f;
	--color-partner-bright: #5877c8;
	--color-partner-pale: #c2cce6;
	--color-partner-tint: #edf0f9;
	--partner-rgb: 48, 73, 143;
	--color-solid: #121c3d;
	--color-solid-hi: #263872;
	--color-on-solid: #ffffff;
	--color-link: #30498f;
	--color-wordmark: #121c3d;
	--color-page: #f0f2f6;
	--color-ground: #f0f2f6;
	--color-surface: #ffffff;
	--color-surface-raised: #ffffff;
	--color-surface-sunk: #f6f7fa;
	--color-segment: #e3e7ee;
	--color-bar: rgba(255, 255, 255, 0.92);
	--color-line: #e0e4ec;
	--color-line-soft: #ebeef3;
	--color-text: #121729;
	--color-text-2: #474e64;
	--color-text-3: #5f677d;
	--color-text-4: #a3a9ba;
	--color-success: #1e8f63;
	--color-success-bright: #27a571;
	--color-success-ink: #0f6143;
	--color-success-tint: #e2f4eb;
	--color-success-solid: #157a53;
	--color-danger: #c0342a;
	--color-danger-tint: #fcecea;
	--color-danger-solid: #c0342a;
	--color-agent: #9a3391;
	--color-agent-tint: #f6e9f3;
	--color-auto: #566072;
	--color-auto-tint: #e8ebf0;
	--color-freee: #2b66e8;
	--color-freee-tint: #e8effd;
	--flow-buy-0: #cad3eb;
	--flow-buy-1: #8093c8;
	--flow-buy-2: #30498f;
	--flow-sell-end: #17244f;
	--flow-stock-top: #263872;
	--flow-stock-bottom: #121c3d;
	--flow-cap: #121c3d;
	--shadow-rgb: 18, 28, 61;
	--highlight-inset: #ffffff;
	--bezel-0: #2c3760;
	--bezel-1: #0a0f22;
	--color-device-island: #060911;
	--image-filter: none;
	--shadow-1:
		0 0 0 1px rgba(var(--shadow-rgb), 0.07), 0 1px 1px rgba(var(--shadow-rgb), 0.04),
		0 2px 6px -1px rgba(var(--shadow-rgb), 0.06);
	--shadow-2:
		0 0 0 1px rgba(var(--shadow-rgb), 0.06), 0 2px 4px rgba(var(--shadow-rgb), 0.04),
		0 12px 28px -8px rgba(var(--shadow-rgb), 0.16);
	--shadow-3:
		0 0 0 1px rgba(var(--shadow-rgb), 0.07), 0 4px 8px rgba(var(--shadow-rgb), 0.05),
		0 28px 56px -16px rgba(var(--shadow-rgb), 0.28);
	--shadow-button:
		0 0 0 1px rgba(var(--shadow-rgb), 0.12), 0 1px 1.5px rgba(var(--shadow-rgb), 0.1),
		inset 0 -1px 0 rgba(var(--shadow-rgb), 0.04);
	--shadow-field:
		0 0 0 1px rgba(var(--shadow-rgb), 0.16), inset 0 1px 2px rgba(var(--shadow-rgb), 0.07);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--color-edge: var(--color-line);
		color-scheme: dark;
		--color-brand: #f47b2c;
		--color-brand-hi: #ff9a55;
		--color-brand-deep: #e0661c;
		--color-brand-ink: #ffb482;
		--color-brand-tint: #3b2617;
		--color-brand-tint-2: #4d3019;
		--color-brand-fill-top: #f27a2c;
		--color-brand-fill-bottom: #e56c1e;
		--color-brand-border: #b9500f;
		--color-brand-wash-top: #35241a;
		--color-brand-wash-bottom: #2d1f17;
		--color-on-brand: #121c3d;
		--brand-rgb: 244, 123, 44;
		--color-partner-deep: #111937;
		--color-partner-deep-2: #182247;
		--color-partner-hi: #25356c;
		--color-partner: #30498f;
		--color-partner-bright: #5877c8;
		--color-partner-pale: #3a4568;
		--color-partner-tint: #222840;
		--partner-rgb: 111, 139, 220;
		--color-solid: #3a56a6;
		--color-solid-hi: #4765bc;
		--color-on-solid: #ffffff;
		--color-link: #a3b8f4;
		--color-wordmark: #f3eee9;
		--color-page: #0e0c0b;
		--color-ground: #171412;
		--color-surface: #221e1b;
		--color-surface-raised: #2e2925;
		--color-surface-sunk: #1b1816;
		--color-segment: #110f0d;
		--color-bar: rgba(30, 26, 23, 0.94);
		--color-line: #38322d;
		--color-line-soft: #2b2622;
		--color-text: #f3eee9;
		--color-text-2: #c0b7af;
		--color-text-3: #9a9189;
		--color-text-4: #6a625b;
		--color-success: #3fb283;
		--color-success-bright: #3fb283;
		--color-success-ink: #86ddb4;
		--color-success-tint: #173325;
		--color-success-solid: #1c7a55;
		--color-danger: #f3776b;
		--color-danger-tint: #3b1e1b;
		--color-danger-solid: #b5392f;
		--color-agent: #efa0e2;
		--color-agent-tint: #3a1f36;
		--color-auto: #a8b6c1;
		--color-auto-tint: #2a3137;
		--color-freee: #79a2ff;
		--color-freee-tint: #1c2848;
		--flow-buy-0: #22283c;
		--flow-buy-1: #2f3f73;
		--flow-buy-2: #435a9e;
		--flow-sell-end: #6a82c6;
		--flow-stock-top: #4a62aa;
		--flow-stock-bottom: #33478a;
		--flow-cap: #7b92d4;
		--shadow-rgb: 0, 0, 0;
		--highlight-inset: rgba(255, 255, 255, 0.05);
		--bezel-0: #4a433d;
		--bezel-1: #1e1a17;
		--color-device-island: #060911;
		--image-filter: brightness(0.86) saturate(0.96);
		--shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.035);
		--shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 30px -10px rgba(0, 0, 0, 0.6);
		--shadow-3: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
		--shadow-button: 0 0 0 1px rgba(255, 255, 255, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.05);
		--shadow-field: 0 0 0 1px rgba(255, 255, 255, 0.16);
	}
}
:root[data-theme="dark"] {
	--color-edge: var(--color-line);
	color-scheme: dark;
	--color-brand: #f47b2c;
	--color-brand-hi: #ff9a55;
	--color-brand-deep: #e0661c;
	--color-brand-ink: #ffb482;
	--color-brand-tint: #3b2617;
	--color-brand-tint-2: #4d3019;
	--color-brand-fill-top: #f27a2c;
	--color-brand-fill-bottom: #e56c1e;
	--color-brand-border: #b9500f;
	--color-brand-wash-top: #35241a;
	--color-brand-wash-bottom: #2d1f17;
	--color-on-brand: #121c3d;
	--brand-rgb: 244, 123, 44;
	--color-partner-deep: #111937;
	--color-partner-deep-2: #182247;
	--color-partner-hi: #25356c;
	--color-partner: #30498f;
	--color-partner-bright: #5877c8;
	--color-partner-pale: #3a4568;
	--color-partner-tint: #222840;
	--partner-rgb: 111, 139, 220;
	--color-solid: #3a56a6;
	--color-solid-hi: #4765bc;
	--color-on-solid: #ffffff;
	--color-link: #a3b8f4;
	--color-wordmark: #f3eee9;
	--color-page: #0e0c0b;
	--color-ground: #171412;
	--color-surface: #221e1b;
	--color-surface-raised: #2e2925;
	--color-surface-sunk: #1b1816;
	--color-segment: #110f0d;
	--color-bar: rgba(30, 26, 23, 0.94);
	--color-line: #38322d;
	--color-line-soft: #2b2622;
	--color-text: #f3eee9;
	--color-text-2: #c0b7af;
	--color-text-3: #9a9189;
	--color-text-4: #6a625b;
	--color-success: #3fb283;
	--color-success-bright: #3fb283;
	--color-success-ink: #86ddb4;
	--color-success-tint: #173325;
	--color-success-solid: #1c7a55;
	--color-danger: #f3776b;
	--color-danger-tint: #3b1e1b;
	--color-danger-solid: #b5392f;
	--color-agent: #efa0e2;
	--color-agent-tint: #3a1f36;
	--color-auto: #a8b6c1;
	--color-auto-tint: #2a3137;
	--color-freee: #79a2ff;
	--color-freee-tint: #1c2848;
	--flow-buy-0: #22283c;
	--flow-buy-1: #2f3f73;
	--flow-buy-2: #435a9e;
	--flow-sell-end: #6a82c6;
	--flow-stock-top: #4a62aa;
	--flow-stock-bottom: #33478a;
	--flow-cap: #7b92d4;
	--shadow-rgb: 0, 0, 0;
	--highlight-inset: rgba(255, 255, 255, 0.05);
	--bezel-0: #4a433d;
	--bezel-1: #1e1a17;
	--color-device-island: #060911;
	--image-filter: brightness(0.86) saturate(0.96);
	--shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.035);
	--shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 30px -10px rgba(0, 0, 0, 0.6);
	--shadow-3: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
	--shadow-button: 0 0 0 1px rgba(255, 255, 255, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.05);
	--shadow-field: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* ================= end tokens ================= */
* {
	box-sizing: border-box;
	margin: 0;
}
html {
	-webkit-text-size-adjust: 100%;
}
body {
	background: var(--color-page);
	color: var(--color-text);
	font-family: var(--font-ui);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	min-height: 100dvh;
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
button {
	border: 0;
	background: none;
	cursor: pointer;
}
a {
	color: var(--color-link);
}
:focus-visible {
	outline: 2.5px solid var(--color-brand);
	outline-offset: 2px;
	border-radius: 8px;
}
[hidden] {
	display: none !important;
}
.sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.ic {
	width: 20px;
	height: 20px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.ic.lg {
	width: 22px;
	height: 22px;
}

/* wordmark: こぶとり, ぶ's dakuten = two mandarin dots; no extra letter spacing */
.logo {
	display: inline-flex;
	flex-direction: column;
	gap: 0.2em;
	line-height: 1;
	min-width: 0;
	text-decoration: none;
}
.wm {
	display: inline-flex;
	align-items: baseline;
	font-family: var(--font-logo-kana);
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
	position: relative;
	color: var(--color-wordmark);
}
.wm .dk {
	position: relative;
	display: inline-block;
	width: 0;
	height: 1em;
	vertical-align: top;
}
.wm .dk i {
	position: absolute;
	width: 0.165em;
	height: 0.165em;
	border-radius: 50%;
	background: var(--color-brand);
}
.wm .dk i:first-child {
	left: -0.3em;
	top: -0.11em;
}
.wm .dk i:last-child {
	left: -0.135em;
	top: 0.055em;
}
.wml {
	font-family: var(--font-logo-latin);
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--color-text-2);
	line-height: 1;
	font-size: 0.16em;
	padding-left: 0.06em;
}
/* Inter's T sits left in its advance: at 0.14em tracking "KOBUT ORI" shows a gap. Shift the T. */
.wml .t {
	margin: 0 -0.1em 0 0.06em;
}
.logo.inv {
	--color-wordmark: var(--color-on-solid);
}
.logo.inv .wml {
	color: rgba(255, 255, 255, 0.7);
}
.appicon {
	display: inline-block;
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 22.5%;
	overflow: hidden;
	/* dark mode: a 1px ring keeps the navy tile off the dark header */
	box-shadow:
		0 0 0 1px var(--color-edge, transparent),
		0 1px 2px rgba(var(--shadow-rgb), 0.2);
}
.appicon svg {
	display: block;
	width: 100%;
	height: 100%;
}
.appicon text {
	font-family: var(--font-logo-latin);
	font-weight: 700;
}
.k-bg {
	fill: #121c3d;
}
.k-fg {
	fill: #fff;
}
.k-dot {
	fill: #f26a0f;
}

/* buttons: 44px minimum targets */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
	background: var(--color-surface-raised);
	color: var(--color-text);
	box-shadow: var(--shadow-button);
	text-decoration: none;
	transition:
		transform 0.12s,
		filter 0.12s;
}
.btn:hover {
	filter: brightness(0.98);
}
.btn:active {
	transform: translateY(1px);
}
.btn[disabled],
.btn[aria-disabled="true"] {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}
.btn.pri {
	background: linear-gradient(180deg, var(--color-brand-fill-top), var(--color-brand-fill-bottom));
	color: var(--color-on-brand);
	box-shadow:
		0 0 0 1px var(--color-brand-border),
		0 1px 2px rgba(173, 63, 6, 0.35),
		0 6px 14px -6px rgba(var(--brand-rgb), 0.7),
		inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn.ink {
	background: linear-gradient(180deg, var(--color-solid-hi), var(--color-solid));
	color: var(--color-on-solid);
	box-shadow:
		0 0 0 1px var(--color-solid),
		0 1px 2px rgba(var(--shadow-rgb), 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn.no {
	color: var(--color-danger);
}
.btn.danger {
	background: var(--color-danger-solid);
	color: #fff;
	box-shadow:
		0 0 0 1px var(--color-danger-solid),
		0 1px 2px rgba(var(--shadow-rgb), 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.lg {
	min-height: 54px;
	font-size: 16.5px;
	border-radius: 14px;
	width: 100%;
}
.btn.block {
	width: 100%;
}
.btn.quiet {
	background: none;
	box-shadow: none;
	color: var(--color-link);
	padding: 0 10px;
}
.linkbtn {
	background: none;
	border: 0;
	color: var(--color-link);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	min-height: 44px;
	padding: 0 4px;
}
.busy {
	position: relative;
	color: transparent !important;
}
.busy::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2.5px solid var(--color-on-brand);
	border-right-color: transparent;
	animation: spin 0.8s linear infinite;
}
.btn:not(.pri).busy::after {
	border-color: var(--color-text);
	border-right-color: transparent;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* fields */
.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.field > span,
.field > legend {
	font-size: 13px;
	color: var(--color-text-2);
	font-weight: 600;
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field select {
	width: 100%;
	min-height: 48px;
	border-radius: 12px;
	border: 0;
	padding: 0 14px;
	font-size: 16px;
	color: var(--color-text);
	background: var(--color-surface-raised);
	box-shadow: var(--shadow-field);
}
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus {
	outline: 0;
	box-shadow:
		0 0 0 2px var(--color-brand),
		0 0 0 5px rgba(var(--brand-rgb), 0.18);
}
.field input[aria-invalid="true"] {
	box-shadow: 0 0 0 2px var(--color-danger);
}
.field small {
	font-size: 12.5px;
	color: var(--color-text-3);
}
fieldset.field {
	border: 0;
	padding: 0;
}
.checks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 4px 12px;
}
.check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-size: 14.5px;
}
.check input {
	width: 20px;
	height: 20px;
	accent-color: var(--color-brand);
	flex: none;
}
.err {
	color: var(--color-danger);
	font-size: 13.5px;
	font-weight: 600;
}
.note {
	font-size: 13.5px;
	color: var(--color-text-2);
}
.fine {
	font-size: 12px;
	color: var(--color-text-3);
	text-align: center;
}

/* notices */
.notice {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	border-radius: var(--radius-md);
	font-size: 14px;
	background: var(--color-partner-tint);
	color: var(--color-text);
}
.notice .ic {
	margin-top: 1px;
	color: var(--color-link);
}
.notice.bad {
	background: var(--color-danger-tint);
}
.notice.bad .ic {
	color: var(--color-danger);
}
.notice.ok {
	background: var(--color-success-tint);
}
.notice.ok .ic {
	color: var(--color-success-ink);
}
.notice.warn {
	background: var(--color-brand-tint);
}
.notice.warn .ic {
	color: var(--color-brand-ink);
}
.notice b {
	display: block;
}

/* ---------- auth screens (sign-in, invite): 藍 ground, art, white sheet ---------- */
.auth {
	background: var(--color-partner-deep);
	color: var(--color-on-solid);
	min-height: 100dvh;
	display: flex;
	justify-content: center;
}
.auth-col {
	width: 100%;
	max-width: 480px;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	padding-top: env(safe-area-inset-top);
}
.si-art {
	flex: 1;
	min-height: 240px;
	position: relative;
	overflow: hidden;
}
.si-art svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.si-art .wmw {
	position: absolute;
	left: 26px;
	bottom: 30px;
	right: 20px;
}
.si-art .logo {
	font-size: 52px;
}
/* dead-end invite screens: the art steps back so the next step stays above the fold */
@media (max-width: 899px) {
	.auth-col:has([data-dead]:not([hidden])) .si-art {
		flex: none;
		min-height: 140px;
		height: 140px;
	}
	.auth-col:has([data-dead]:not([hidden])) .si-art .logo {
		font-size: 40px;
	}
	.auth-col:has([data-dead]:not([hidden])) .si-art p,
	.auth-col:has([data-dead]:not([hidden])) .si-art .wml {
		display: none;
	}
}
.copylink {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.copylink .secret {
	user-select: all;
	-webkit-user-select: all;
}
.si-art p {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.78);
	margin-top: 12px;
	font-weight: 500;
}
.g1a {
	stop-color: var(--color-partner);
	stop-opacity: 0;
}
.g1b {
	stop-color: var(--color-partner);
}
.g1c {
	stop-color: var(--color-partner-bright);
}
.g2a {
	stop-color: var(--color-partner-hi);
	stop-opacity: 0;
}
.g2b {
	stop-color: var(--color-partner-hi);
}
.g2c {
	stop-color: var(--color-partner);
}
.g3a {
	stop-color: var(--color-brand-hi);
}
.g3b {
	stop-color: var(--color-brand);
}
.g3c {
	stop-color: var(--color-brand-deep);
}
.o8 {
	opacity: 0.8;
}
.sheet {
	background: var(--color-surface);
	color: var(--color-text);
	border-radius: 30px 30px 0 0;
	padding: 26px 22px calc(28px + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	gap: 14px;
	box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, 0.5);
}
.sheet h1,
.sheet h2 {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}
.sheet .lead {
	font-size: 15px;
	color: var(--color-text-2);
}
.sheet .center {
	text-align: center;
}
.help {
	border-radius: var(--radius-md);
	background: var(--color-surface-sunk);
	box-shadow: inset 0 0 0 1px var(--color-line-soft);
	padding: 14px 16px;
	font-size: 14px;
	color: var(--color-text-2);
}
.help h2 {
	font-size: 15px;
	color: var(--color-text);
	margin-bottom: 4px;
}
.help ol {
	padding-left: 1.3em;
}
.countdown {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	font-size: 13px;
	font-weight: 600;
	color: var(--color-brand-ink);
	background: var(--color-brand-tint);
	border-radius: var(--radius-pill);
	padding: 4px 12px;
}
.big-ok {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--color-success-tint);
	color: var(--color-success-ink);
	align-self: center;
}
.big-ok .ic {
	width: 34px;
	height: 34px;
	stroke-width: 2.4;
}
@media (min-width: 900px) {
	.auth {
		align-items: center;
		padding: 32px;
	}
	.auth-col {
		min-height: 0;
		max-width: 960px;
		flex-direction: row;
		border-radius: 28px;
		overflow: hidden;
		box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
		background: var(--color-partner-deep);
	}
	.si-art {
		min-height: 600px;
	}
	.si-art .logo {
		font-size: 72px;
	}
	.sheet {
		width: 440px;
		flex: none;
		border-radius: 0;
		justify-content: center;
		padding: 40px 36px;
	}
}

/* ---------- app shell ---------- */
.top {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 6px max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left));
	padding-top: max(6px, env(safe-area-inset-top));
	background: var(--color-bar);
	box-shadow: 0 1px 0 var(--color-line);
	backdrop-filter: saturate(1.4) blur(12px);
}
.top .logo {
	font-size: 24px;
	flex-direction: row;
	align-items: center;
	gap: 8px;
}
.top .logo .wml {
	display: none;
}
.yg {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: var(--radius-pill);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--color-text-2);
	background: var(--color-surface-sunk);
	box-shadow: inset 0 0 0 1px var(--color-line);
	white-space: nowrap;
	max-width: 46vw;
	overflow: hidden;
	text-overflow: ellipsis;
}
.yg i {
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--color-partner);
	flex: none;
}
.yg {
	cursor: default;
}
.acct {
	margin-left: auto;
	position: relative;
}
.acct summary {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
}
.acct summary::-webkit-details-marker {
	display: none;
}
.av {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, var(--color-brand-hi), var(--color-brand) 62%);
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 14px;
	color: var(--color-on-brand);
}
.menu {
	position: absolute;
	right: 0;
	top: 50px;
	min-width: 240px;
	background: var(--color-surface-raised);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-3);
	padding: 8px;
	display: flex;
	flex-direction: column;
	z-index: 20;
}
.menu .who {
	padding: 8px 12px 10px;
	font-size: 13px;
	color: var(--color-text-3);
	box-shadow: 0 1px 0 var(--color-line-soft);
	margin-bottom: 6px;
	overflow: hidden;
	text-overflow: ellipsis;
}
.menu .who b {
	display: block;
	color: var(--color-text);
	font-size: 14.5px;
}
.menu a,
.menu button {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 10px;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	width: 100%;
	text-align: left;
}
.menu a:hover,
.menu button:hover {
	background: var(--color-surface-sunk);
}
.wrap {
	max-width: 960px;
	margin: 0 auto;
	padding: 18px max(16px, env(safe-area-inset-left)) calc(48px + env(safe-area-inset-bottom))
		max(16px, env(safe-area-inset-right));
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.ph {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.ph h1 {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.ph .sub {
	font-size: 13.5px;
	color: var(--color-text-3);
	width: 100%;
}
.tabs {
	display: flex;
	gap: 4px;
	padding: 4px;
	border-radius: var(--radius-md);
	background: var(--color-segment);
	overflow-x: auto;
	scrollbar-width: none;
}
.tabs a {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 14px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text-2);
	text-decoration: none;
	white-space: nowrap;
}
.tabs a[aria-current="page"] {
	background: var(--color-surface-raised);
	color: var(--color-text);
	box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.16);
}
.card {
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-1);
	min-width: 0;
}
.card > h2,
.card .ch {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 18px 6px;
	font-size: 16px;
	font-weight: 700;
}
.card .ch .btn {
	margin-left: auto;
}
.card .body {
	padding: 8px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.card > .notice {
	margin: 0 18px 8px;
}
.card .desc {
	padding: 0 18px 8px;
	font-size: 13.5px;
	color: var(--color-text-2);
}
.rows {
	list-style: none;
	padding: 0;
}
.rows > li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 18px;
	min-width: 0;
	flex-wrap: wrap;
}
.rows > li + li {
	box-shadow: 0 -1px 0 var(--color-line-soft);
}
.rows .m {
	flex: 1;
	min-width: 180px;
}
.rows .m b {
	display: block;
	font-size: 15px;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.rows .m small {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	font-size: 12.5px;
	color: var(--color-text-3);
	margin-top: 2px;
}
.rows .acts {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}
.rows .acts.split {
	flex-basis: 100%;
	justify-content: space-between;
	align-items: flex-start;
}
.acts .del {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	max-width: 60%;
}
.hint {
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--color-text-3);
	text-align: right;
}
.quote {
	padding: 12px 14px;
	border-radius: var(--radius-md);
	background: var(--color-surface-sunk);
	box-shadow: inset 0 0 0 1px var(--color-line-soft);
	font-size: 14.5px;
	color: var(--color-text);
}
.steps {
	padding-left: 1.4em;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 15px;
}
.rows .empty {
	color: var(--color-text-3);
	font-size: 14px;
}
.pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 22px;
	padding: 0 9px 0 7px;
	border-radius: var(--radius-pill);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	background: var(--color-surface-sunk);
	color: var(--color-text-2);
	box-shadow: inset 0 0 0 1px rgba(var(--shadow-rgb), 0.06);
}
.pill::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}
.pill.live {
	background: var(--color-success-tint);
	color: var(--color-success-ink);
}
.pill.todo {
	background: var(--color-brand-tint);
	color: var(--color-brand-ink);
}
.pill.deny {
	background: var(--color-danger-tint);
	color: var(--color-danger);
}
.pill.none {
	color: var(--color-text-3);
}
.role {
	font-size: 12px;
	font-weight: 600;
	color: var(--color-text-2);
	background: var(--color-surface-sunk);
	box-shadow: inset 0 0 0 1px var(--color-line);
	border-radius: 6px;
	padding: 1px 7px;
	white-space: nowrap;
}
.grid2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
@media (min-width: 720px) {
	.grid2 {
		grid-template-columns: 1fr 1fr;
	}
}
.inline {
	display: flex;
	gap: 8px;
	align-items: flex-end;
	flex-wrap: wrap;
}
.inline .field {
	flex: 1;
	min-width: 160px;
}
.home-hero {
	padding: 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.home-hero h1 {
	font-size: 22px;
}
.navrow {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 10px 18px;
	font-size: 15px;
	font-weight: 600;
	color: var(--color-text);
	text-decoration: none;
}
.navrow + .navrow {
	box-shadow: 0 -1px 0 var(--color-line-soft);
}
.navrow small {
	display: block;
	font-size: 12.5px;
	color: var(--color-text-3);
	font-weight: 400;
}
.navrow .ic.end {
	margin-left: auto;
	color: var(--color-text-4);
}

/* ---------- sheets (dialog): step-up, shown-once secret, confirm ---------- */
dialog.bs {
	border: 0;
	padding: 0;
	margin: auto auto 0;
	width: 100%;
	max-width: 520px;
	max-height: 92dvh;
	background: var(--color-surface);
	color: var(--color-text);
	border-radius: 26px 26px 0 0;
	border-top: 1px solid var(--color-edge, transparent);
	box-shadow: 0 -24px 48px -20px rgba(var(--shadow-rgb), 0.5);
}
dialog.bs::backdrop {
	background: rgba(var(--shadow-rgb), 0.45);
}
dialog.bs .in {
	padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	gap: 14px;
}
dialog.bs .grab {
	width: 40px;
	height: 5px;
	border-radius: 3px;
	background: var(--color-line);
	align-self: center;
}
dialog.bs h2 {
	font-size: 20px;
	font-weight: 700;
}
dialog.bs .row2 {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
dialog.bs .row2 .btn {
	flex: 1;
}
@media (min-width: 720px) {
	dialog.bs {
		margin: auto;
		border-radius: 22px;
	}
}
.secret {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13.5px;
	line-height: 1.5;
	padding: 12px 14px;
	border-radius: var(--radius-md);
	background: var(--color-surface-sunk);
	box-shadow: inset 0 0 0 1px var(--color-line);
	overflow-wrap: anywhere;
	user-select: all;
	-webkit-user-select: all;
}
.msg {
	white-space: pre-wrap;
	font-size: 13.5px;
	color: var(--color-text-2);
	padding: 12px 14px;
	border-radius: var(--radius-md);
	background: var(--color-partner-tint);
}
@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}
.btn.sm {
	font-size: 13.5px;
	padding: 0 14px;
}
.grid1 {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.acts .field {
	min-width: 130px;
}
.acts .field select {
	min-height: 44px;
}
.msg,
.secret {
	overflow-wrap: anywhere;
	word-break: break-all;
}
#invite > section {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
/* Headings take focus only to move a screen reader to the new state; keyboard focus rings stay. */
h1[tabindex="-1"]:focus {
	outline: none;
}
