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

/* 作者样式里的 display:flex 会盖掉 UA 的 [hidden]{display:none}，必须显式压住 */
[hidden] { display: none !important; }

.box-main {
		--im-ink: #1c2028;
		--im-jade: #2f7a62;
		--im-jade-dark: #27654f;
		--im-line: #e6e0d4;
		--im-soft: #fdfcf9;
		--im-muted: #6b6f76;
		min-height: 100dvh;
		padding: 36px 20px 48px;
		background: #fdfaf5;
		color: var(--im-ink);
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.box-brand { width: 100%; max-width: 520px; margin-bottom: 22px; }
	.box-brand a { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; font-size: 14px; letter-spacing: .02em; }
	.box-brand img { width: 128px; height: auto; display: block; }
	.box-brand-sub { color: var(--im-muted); font-size: 15px; letter-spacing: .02em; padding-left: 12px; border-left: 1px solid var(--im-line); }
	.box-countdown { color: #c0392b; font-weight: 600; font-variant-numeric: tabular-nums; }
	.box-countdown.is-urgent {
		display: inline-block; margin-left: 2px; padding: 1px 7px;
		font-size: 19px; font-weight: 700; letter-spacing: .01em;
		border-radius: 6px; background: rgba(192, 57, 43, .09);
	}

	.box-card {
		width: 100%; max-width: 520px;
		background: #fff;
		border: 1px solid var(--im-line);
		border-radius: 14px;
		padding: 30px 28px 26px;
		box-shadow: 0 1px 2px rgba(28, 32, 40, .03);
	}
	.box-card h1 {
		color: #111418;
		/* 用站点字标同款衬线（Noto Serif SC webfont，有真正的 700 字重）；
		   不再优先 Songti SC —— Safari 下它会匹配到细体，800 也只是合成，越合成越灰 */
		font-family: var(--font-brand, "Noto Serif SC", "Songti SC", serif);
		font-size: 25px; line-height: 1.45; letter-spacing: .02em; margin: 0 0 10px;
		font-weight: 700;
		-webkit-font-smoothing: subpixel-antialiased;
		-moz-osx-font-smoothing: auto;
		text-rendering: geometricPrecision;
	}
	.box-desc { font-size: 14.5px; line-height: 1.8; color: #4a4f57; margin: 0 0 12px; white-space: pre-wrap; }
	.box-deadline { font-size: 13px; color: var(--im-muted); margin: 0 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--im-line); }
	.box-muted { color: var(--im-muted); font-size: 14px; line-height: 1.8; margin: 0; }

	.box-field { margin-bottom: 18px; }
	.box-label { display: block; font-size: 13.5px; margin-bottom: 7px; color: #4a4f57; }
	.box-label em { color: #a33636; font-style: normal; margin-left: 3px; }
	.box-field input[type="text"], .box-field textarea {
		width: 100%; padding: 11px 13px; font: inherit; font-size: 15px;
		background: #fdfcf9; border: 1px solid var(--im-line); border-radius: 9px;
		color: inherit; transition: border-color .15s, box-shadow .15s;
	}
	.box-field textarea { min-height: 88px; resize: vertical; }
	.box-field input:focus, .box-field textarea:focus {
		outline: none; border-color: var(--im-jade);
		box-shadow: 0 0 0 3px rgba(47, 122, 98, .14);
	}

	.box-filepick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
	.box-filebtn {
		display: inline-flex; align-items: center; justify-content: center;
		padding: 8px 16px; border: 1px solid var(--im-line); border-radius: 8px;
		background: #fff; color: var(--im-ink); font-size: 14px; cursor: pointer;
		transition: border-color .15s, color .15s, background .15s;
	}
	.box-filebtn:hover { border-color: var(--im-jade); color: var(--im-jade); background: #fbfaf6; }
	.box-filehint { font-size: 12.5px; color: var(--im-muted); }
	.box-files { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
	.box-files li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 7px; background: #f7f5ef; }
	.box-files li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.box-files li small { color: #8a8f96; font-variant-numeric: tabular-nums; }
	.box-files li button { border: 0; background: transparent; color: #8a8f96; cursor: pointer; line-height: 1; padding: 2px; }
	.box-files li button:hover { color: #a33636; }
	.box-files li.is-ok::after { content: "✓"; color: #2f7a62; }
	.box-files li.is-err::after { content: "!"; color: #a33636; }

	.box-submit {
		width: 100%; margin-top: 8px; padding: 13px 18px; border: 0; border-radius: 9px;
		background: var(--im-jade); color: #fff; font: inherit; font-size: 15px;
		cursor: pointer; transition: opacity .15s, transform .05s;
	}
	.box-submit:hover { background: var(--im-jade-dark); }
	.box-submit:active { transform: translateY(1px); }
	.box-submit:disabled { opacity: .55; cursor: default; }
	.box-tip { text-align: center; font-size: 12.5px; color: #8a8f96; margin: 12px 0 0; }
	.box-error { color: #a33636; font-size: 13.5px; margin: 10px 0 0; min-height: 19px; }

	.box-success { text-align: center; padding-top: 44px; padding-bottom: 40px; }
	.box-check { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%; background: #eef5f1; display: flex; align-items: center; justify-content: center; }
	.box-check svg { width: 26px; height: 26px; color: #2f7a62; }
	.box-again { margin-top: 20px; border: 1px solid var(--im-line); background: transparent; color: inherit; padding: 9px 18px; border-radius: 8px; font: inherit; font-size: 13.5px; cursor: pointer; }
	.box-again:hover { background: #faf8f3; }

	.box-skeleton { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
	.box-skeleton i { display: block; height: 14px; border-radius: 6px; background: #f1eee7; animation: box-pulse 1.4s ease-in-out infinite; }
	.box-skeleton i:nth-child(1) { width: 42%; height: 22px; }
	.box-skeleton i:nth-child(2) { width: 100%; }
	.box-skeleton i:nth-child(3) { width: 68%; }
	@keyframes box-pulse { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }

	.box-foot { margin-top: auto; padding-top: 28px; font-size: 12.5px; color: #9a9ea4; }
	.box-foot a { color: inherit; text-decoration: none; }
	.box-foot a:hover { text-decoration: underline; }

	/* ── 固定暖白纸感：不跟随站点深色主题 ──
	   站点全局有 `html.dark h1{...}`（特异性 0,1,2），会盖掉 `.box-card h1`（0,1,1），
	   于是深色模式用户看到的是浅灰标题压在白色卡片上。这里逐项加高特异性覆盖。 */
	html.dark .box-main { background: #fdfaf5; color: #1c2028; }
	html.dark .box-card { background: #fff; border-color: #e6e0d4; box-shadow: 0 1px 2px rgba(28, 32, 40, .03); }
	html.dark .box-card h1 { color: #111418; }
	html.dark .box-desc { color: #4a4f57; }
	html.dark .box-deadline, html.dark .box-muted, html.dark .box-tip, html.dark .box-foot { color: #6b6f76; }
	html.dark .box-label { color: #4a4f57; }
	html.dark .box-field input[type="text"], html.dark .box-field textarea {
		background: #fdfcf9; color: #1c2028; border-color: #e6e0d4;
	}
	html.dark .box-files li { background: #f7f5ef; color: #1c2028; }
	html.dark .box-submit { background: #2f7a62; color: #fff; }
	html.dark .box-again { color: #1c2028; border-color: #e6e0d4; }
	html.dark .box-brand-sub { color: #6b6f76; }

	@media (max-width: 560px) {
		.box-main { padding: 22px 14px 36px; }
		.box-card { padding: 26px 20px 24px; border-radius: 12px; }
		.box-card h1 { font-size: 23px; }
	}
