:root {
	--bg: #f3f6fa;
	--surface: #ffffff;
	--surface-soft: #f8fbff;
	--line: #d8e2ec;
	--line-strong: #c3d1df;
	--text: #1f2a37;
	--text-muted: #5f7084;
	--primary: #0b84ff;
	--primary-soft: #dcecff;
	--accent: #ff6b2d;
	--shadow-sm: 0 1px 2px rgba(31, 42, 55, 0.08);
	--shadow-md: 0 10px 28px rgba(22, 42, 64, 0.12);
	--radius-md: 12px;
	--radius-lg: 16px;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 480px;
	grid-template-rows: auto minmax(0, 1fr);
	grid-template-areas:
		"header header"
		"board send";
	overflow: hidden;
	background: var(--bg);
	color: var(--text);
	font:
		14px / 1.5 "PingFang SC",
		"Hiragino Sans GB",
		"Microsoft YaHei",
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		sans-serif;
	user-select: none;
}

.title {
	grid-area: header;
	position: relative;
	z-index: 20;
	min-height: 68px;
	padding: calc(env(safe-area-inset-top) + 12px) 20px 12px;
	border-bottom: 1px solid rgba(0, 58, 115, 0.4);
	background: linear-gradient(135deg, #0c79dd 0%, #1a9aff 100%);
	box-shadow: 0 8px 20px rgba(8, 76, 141, 0.28);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.title-brand {
	min-width: 0;
}

.title-main {
	font-size: 20px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #ffffff;
}

.title-sub {
	margin-top: 2px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.86);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.title-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.share,
.readme {
	width: 34px;
	height: 34px;
	padding: 7px;
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.22);
	cursor: pointer;
	transition:
		transform 0.15s ease,
		box-shadow 0.2s ease,
		border-color 0.2s ease;
}

.share:hover,
.readme:hover {
	transform: translateY(-1px);
	border-color: rgba(255, 255, 255, 0.65);
	background: rgba(255, 255, 255, 0.3);
	box-shadow: 0 2px 8px rgba(12, 45, 80, 0.28);
}

.share:focus-visible,
.readme:focus-visible,
.send:focus-visible,
.go-to-code button:focus-visible,
.go-to-code .code:focus-visible,
.text:focus-visible {
	outline: 2px solid rgba(11, 132, 255, 0.6);
	outline-offset: 2px;
}

.div-checkbox {
	width: auto;
	height: 34px;
	padding: 0 10px;
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.2);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.div-checkbox i {
	display: block;
	margin: 0;
	padding: 0;
	font-size: 12px;
	line-height: 1;
	color: rgba(255, 255, 255, 0.96);
	font-style: normal;
	font-weight: 600;
	white-space: nowrap;
}

input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

input[type="checkbox"] + label {
	display: inline-block;
	width: 34px;
	height: 20px;
	position: relative;
	border-radius: 999px;
	background: #cfd8e3;
	transition: background 0.2s ease;
	cursor: pointer;
}

input[type="checkbox"] + label:after {
	content: "";
	position: absolute;
	left: 2px;
	top: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease;
}

#mds:checked + label {
	background: #ffb5a0;
}

#mds:checked + label:after {
	transform: translateX(14px);
	background: #d9534f;
}

.board {
	grid-area: board;
	margin: 0;
	padding: 14px;
	overflow: auto;
	list-style: none;
	background: linear-gradient(180deg, #f5f9ff 0%, #eef3f8 100%);
}

.board li {
	margin: 0 0 10px;
	padding: 12px 14px;
	border-radius: var(--radius-md);
	border: 1px solid #c9dcf2;
	background: linear-gradient(180deg, #fafdff 0%, #eef7ff 100%);
	color: var(--text);
	font-size: 13px;
	line-height: 1.45;
	word-break: break-word;
	white-space: break-spaces;
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		transform 0.15s ease,
		box-shadow 0.2s ease;
}

.board li:hover {
	border-color: #8fb9e7;
	transform: translateY(-1px);
	box-shadow: var(--shadow-sm);
}

.board li img {
	display: block;
	border-radius: 10px;
	box-shadow: var(--shadow-sm);
}

.send-form {
	grid-area: send;
	min-width: 0;
	padding: 8px;
	border-left: 1px solid var(--line);
	background: #f5f9fe;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.text {
	width: 100%;
	min-height: 0;
	flex: 1;
	resize: none;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-md);
	padding: 10px;
	background: var(--surface);
	color: var(--text);
	outline: none;
}

.text:focus {
	border-color: #88b9ef;
	box-shadow: 0 0 0 3px rgba(11, 132, 255, 0.12);
}

.text::placeholder {
	color: #7d8ea2;
	line-height: 1.6;
}

.send {
	width: 100%;
	height: 46px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(180deg, #ff7b45 0%, #ff6428 100%);
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 46px;
	text-align: center;
	cursor: pointer;
	transition:
		transform 0.15s ease,
		box-shadow 0.2s ease,
		filter 0.2s ease;
}

.send:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(255, 100, 40, 0.25);
	filter: brightness(1.02);
}

.send:active {
	transform: translateY(0);
}

.div-share-qr {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	top: calc(env(safe-area-inset-top) + 68px);
	bottom: 0;
	z-index: 60;
	background: rgba(15, 23, 32, 0.58);
	backdrop-filter: blur(2px);
	padding: 16px;
}

.share-qr {
	width: min(78vw, 320px);
	margin: min(10vh, 72px) auto 0;
	display: block;
	border: 1px solid #9eb4ca;
	border-radius: var(--radius-md);
	background: #ffffff;
	padding: 8px;
}

.short-code-title,
.short-code {
	width: min(78vw, 320px);
	margin: 0 auto;
	text-align: center;
	background: #22384e;
	color: #eaf2ff;
}

.short-code-title {
	margin-top: 12px;
	padding: 8px 10px;
	font-size: 12px;
	border-radius: 10px 10px 0 0;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
}

.short-code {
	padding: 10px 10px 12px;
	border-radius: 0 0 10px 10px;
	font-size: 28px;
	line-height: 1;
	letter-spacing: 0.22em;
	font-weight: 700;
}

.div-pop-notice {
	position: fixed;
	top: calc(env(safe-area-inset-top) + 10px);
	left: 0;
	z-index: 80;
	width: 100%;
	display: none;
	pointer-events: none;
}

.pop-notice {
	width: min(90vw, 460px);
	margin: 0 auto;
	padding: 11px 14px;
	text-align: center;
	background: linear-gradient(
		135deg,
		rgba(17, 27, 38, 0.93) 0%,
		rgba(27, 43, 60, 0.92) 100%
	);
	border: 1px solid rgba(190, 212, 235, 0.34);
	color: #f8fbff;
	border-radius: 12px;
	box-shadow: 0 12px 24px rgba(8, 20, 33, 0.28);
	font-size: 13px;
	line-height: 1.45;
	font-weight: 600;
	letter-spacing: 0.01em;
	backdrop-filter: blur(8px);
	animation: notice-pop-in 180ms ease-out;
}

@keyframes notice-pop-in {
	from {
		opacity: 0;
		transform: translateY(-8px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.div-beian {
	position: fixed;
	left: 4px;
	bottom: 4px;
	z-index: 30;
	font-size: 12px;
	color: #6a7b8f;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid rgba(174, 195, 216, 0.6);
	border-radius: 999px;
	padding: 3px 10px;
	backdrop-filter: blur(4px);
}

.div-beian a {
	color: inherit;
}

.go-to-code {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	background: linear-gradient(
		180deg,
		rgba(239, 246, 255, 0.98) 0%,
		rgba(233, 241, 250, 0.98) 100%
	);
}

.go-to-code .go-layout {
	width: min(94vw, 860px);
	display: grid;
	grid-template-columns: minmax(260px, 0.48fr) minmax(0, 0.52fr);
	gap: 10px;
	align-items: stretch;
}

.go-to-code .div-go-to {
	width: auto;
	border-radius: var(--radius-lg);
	border: 1px solid var(--line-strong);
	background: var(--surface);
	box-shadow: var(--shadow-md);
	padding: 16px;
	font-size: 16px;
	text-align: left;
}

.go-to-code .go-brand {
	padding: 16px 16px;
	border-radius: var(--radius-lg);
	background: linear-gradient(135deg, #0c79dd 0%, #1a9aff 100%);
	color: #ffffff;
	border: 1px solid rgba(0, 66, 133, 0.35);
	box-shadow: var(--shadow-md);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.go-to-code .go-brand-main {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
}

.go-to-code .go-brand-sub {
	margin-top: 3px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.9);
}

.go-to-code .go-title {
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	color: #20364c;
	margin-bottom: 6px;
}

.go-to-code .go-desc {
	font-size: 14px;
	line-height: 1.6;
	color: #60748b;
	margin-bottom: 12px;
}

.go-to-code .code {
	width: 100%;
	margin-top: 0;
	margin-bottom: 10px;
	height: 44px;
	border-radius: 10px;
	border: 1px solid var(--line-strong);
	padding: 0 12px;
	font-size: 24px;
	letter-spacing: 0.2em;
	text-align: center;
	outline: none;
}

.go-to-code .code:focus {
	border-color: #88b9ef;
	box-shadow: 0 0 0 3px rgba(11, 132, 255, 0.1);
}

.go-to-code .go-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	align-items: center;
}

.go-to-code .go-aux {
	margin-top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	grid-column: 1 / -1;
	padding: 2px 4px 0;
	font-size: 12px;
	color: #6a7f93;
}

.go-to-code .go-readme-link {
	display: inline-flex;
	align-items: center;
	height: 30px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid #bfd7ee;
	background: #f1f8ff;
	color: #1e5e98;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.go-to-code .go-readme-link:hover {
	filter: brightness(0.98);
}

.go-to-code .go-beian {
	text-align: right;
	line-height: 1.35;
}

.go-to-code .go-beian a {
	color: inherit;
}

.go-to-code button {
	width: 100%;
	height: 42px;
	margin-top: 0;
	border-radius: 10px;
	border: 1px solid #9db3c9;
	background: #edf5ff;
	color: #2a3e54;
	cursor: pointer;
	font-weight: 600;
}

.go-to-code .btn-go-to {
	background: #dbeeff;
	border-color: #8bb9ec;
	color: #1f4b78;
}

.go-to-code button:hover {
	filter: brightness(0.98);
}

.board::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.board::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: #b7c6d7;
}

.board::-webkit-scrollbar-track {
	background: transparent;
}

@media (max-width: 1200px) {
	body {
		grid-template-columns: minmax(0, 1fr) 430px;
	}
}

@media (max-width: 1040px) {
	body {
		grid-template-columns: minmax(0, 1fr) 390px;
	}

	.title {
		padding: 10px 12px;
	}

	.title-main {
		font-size: 18px;
	}

	.title-sub {
		max-width: 38vw;
	}
}

@media (max-width: 860px), (orientation: portrait) {
	body {
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"header"
			"board"
			"send";
	}

	.title {
		min-height: 60px;
		padding: calc(env(safe-area-inset-top) + 10px) 10px 10px;
		gap: 8px;
	}

	.div-share-qr {
		top: calc(env(safe-area-inset-top) + 60px);
	}

	.title-main {
		font-size: 17px;
	}

	.title-sub {
		display: none;
	}

	.title-actions {
		gap: 6px;
	}

	.div-checkbox {
		padding: 0 8px;
		gap: 6px;
	}

	.div-checkbox i {
		font-size: 11px;
	}

	.share,
	.readme {
		width: 32px;
		height: 32px;
		padding: 6px;
	}

	.board {
		padding: 10px;
	}

	.board li {
		padding: 11px 12px;
		font-size: 13px;
	}

	.send-form {
		border-left: 0;
		border-top: 1px solid var(--line);
		padding: 7px 8px calc(env(safe-area-inset-bottom) + 7px);
		gap: 8px;
	}

	.text {
		min-height: 120px;
		max-height: 26vh;
		flex: 0 0 auto;
		padding: 9px 10px;
	}

	.send {
		height: 44px;
		line-height: 44px;
		border-radius: 11px;
	}

	.div-beian {
		display: none;
	}

	.go-to-code {
		/* align-items: flex-start; */
		/* justify-content: flex-start; */
		padding: calc(env(safe-area-inset-top) + 18px) 12px
			calc(env(safe-area-inset-bottom) + 18px);
		overflow-y: auto;
		/* padding-top: 20vh; */
	}

	.go-to-code .div-go-to {
		padding: 18px 14px;
		font-size: 15px;
	}

	.go-to-code .go-layout {
		width: min(96vw, 520px);
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.go-to-code .go-brand {
		padding: 18px 14px;
	}

	.go-to-code .go-brand-main {
		font-size: 19px;
	}

	.go-to-code .go-brand-sub {
		font-size: 12px;
	}

	.go-to-code .go-title {
		font-size: 20px;
		margin-bottom: 8px;
	}

	.go-to-code .go-desc {
		font-size: 13px;
		line-height: 1.65;
		margin-bottom: 14px;
	}

	.go-to-code .code {
		height: 48px;
		margin-bottom: 12px;
	}

	.go-to-code button {
		height: 44px;
	}

	.go-to-code .go-actions {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.go-to-code .go-aux {
		margin-top: 4px;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		padding: 0;
	}

	.go-to-code .go-readme-link {
		height: 34px;
		justify-content: center;
	}

	.go-to-code .go-beian {
		text-align: center;
		position: absolute;
		display: block;
		width: 100%;
		bottom: 5vh;
		left: 0;
	}

	.pop-notice {
		width: min(94vw, 440px);
		padding: 10px 12px;
		font-size: 13px;
	}
}

@media (max-width: 420px) {
	.go-to-code {
		padding: calc(env(safe-area-inset-top) + 14px) 10px
			calc(env(safe-area-inset-bottom) + 14px);
		/* padding-top: 20vh; */
		overflow-y: auto;
	}

	.title {
		padding: calc(env(safe-area-inset-top) + 8px) 8px 8px;
	}

	.div-share-qr {
		top: calc(env(safe-area-inset-top) + 56px);
	}

	.title-main {
		font-size: 16px;
	}

	.div-checkbox i {
		display: none;
	}

	.div-checkbox {
		padding: 0 6px;
	}

	.short-code {
		font-size: 24px;
	}

	.go-to-code .go-actions {
		gap: 8px;
	}

	.go-to-code button {
		font-size: 14px;
		padding: 0 8px;
	}

	.go-to-code .go-brand-main {
		font-size: 18px;
	}

	.go-to-code .go-title {
		font-size: 19px;
	}

	.go-to-code .go-desc {
		font-size: 13px;
		margin-bottom: 14px;
	}

	.go-to-code .go-layout {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.go-to-code .go-brand {
		padding: 16px 12px;
	}

	.go-to-code .div-go-to {
		padding: 16px 12px;
	}

	.go-to-code .code {
		height: 46px;
		font-size: 22px;
	}

	.go-to-code .go-aux {
		grid-column: auto;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		padding: 0;
	}

	.go-to-code .go-readme-link {
		justify-content: center;
	}

	.go-to-code .go-beian {
		text-align: center;
	}

	.text {
		min-height: 108px;
		max-height: 22vh;
	}
}
