/*!
 * N1 Store Finder — 前端样式
 * 全部类名带 n1sf- 前缀，变量只挂在 .n1sf-sheet 上，不污染主题。
 */

/* ============================================================
 * 浮层外壳
 * ========================================================= */
.n1sf-sheet {
	--n1sf-ink: #16181d;
	--n1sf-ink-2: #4a4f57;
	--n1sf-ink-3: #8b929b;
	--n1sf-paper: #fff;
	--n1sf-paper-2: #faf9f7;
	--n1sf-line: #e5e4e0;
	--n1sf-ok: #2f5d50;
	--n1sf-gold: #9a7736;
	--n1sf-blue: #1a4b8c;

	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	display: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	color: var(--n1sf-ink);
	-webkit-font-smoothing: antialiased;
}

.n1sf-sheet[data-n1sf-state="open"] {
	display: block;
}

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

/* 主题按钮/链接全局样式隔离 */
.n1sf-sheet button {
	font-family: inherit;
	margin: 0;
	text-transform: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.n1sf-sheet a {
	text-decoration: none;
	box-shadow: none;
}

.n1sf-sheet p {
	margin: 0;
}

/* ============================================================
 * 遮罩 + 面板
 * ========================================================= */
.n1sf-scrim {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(16, 17, 20, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.n1sf-panel {
	position: absolute;
	top: 4vh;
	right: 6vw;
	bottom: 4vh;
	left: 6vw;
	max-width: 720px;
	margin: 0 auto;
	background: #fff;
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

/* ---------- 头部 ---------- */
.n1sf-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 17px 20px 13px;
	border-bottom: 1px solid var(--n1sf-line);
	flex: 0 0 auto;
}

.n1sf-title {
	font-size: 17.5px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.3;
	color: var(--n1sf-ink);
}

.n1sf-sub {
	font-size: 12.3px;
	color: var(--n1sf-ink-3);
	margin-top: 3px;
	max-width: 48ch;
	line-height: 1.5;
}

.n1sf-x {
	border: 1px solid var(--n1sf-line);
	background: #fff;
	border-radius: 8px;
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	color: var(--n1sf-ink-2);
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.n1sf-x:hover,
.n1sf-x:focus-visible {
	background: var(--n1sf-paper-2);
}

/* ---------- 数据来源条 ---------- */
.n1sf-cache {
	padding: 8px 20px;
	background: #fbfaf7;
	border-bottom: 1px solid var(--n1sf-line);
	font: 500 11px/1.5 ui-monospace, Consolas, "SF Mono", monospace;
	color: var(--n1sf-gold);
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.n1sf-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--n1sf-gold);
	flex: 0 0 auto;
}

/* ---------- 内容区 ---------- */
.n1sf-body {
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	flex: 1 1 auto;
	padding: 0 0 10px;
}

/* ============================================================
 * 步骤一 / 步骤二：居中的门板
 * ========================================================= */
.n1sf-gate {
	padding: 34px 24px;
	text-align: center;
	max-width: 440px;
	margin: 0 auto;
}

.n1sf-gate .n1sf-h3 {
	font-size: 19px;
	margin: 0 0 10px;
	letter-spacing: -0.01em;
	line-height: 1.35;
	font-weight: 700;
	color: var(--n1sf-ink);
}

.n1sf-gate .n1sf-p {
	font-size: 13.5px;
	color: var(--n1sf-ink-2);
	margin: 0 0 20px;
	line-height: 1.65;
}

.n1sf-privacy {
	font-size: 12px;
	color: var(--n1sf-ink-3);
	margin-top: 16px;
	line-height: 1.65;
	text-align: left;
	background: var(--n1sf-paper-2);
	border: 1px solid var(--n1sf-line);
	border-radius: 10px;
	padding: 12px 14px;
}

.n1sf-privacy b {
	color: var(--n1sf-ink-2);
}

/* ---------- 按钮 ---------- */
.n1sf-big {
	appearance: none;
	border: 0;
	background: var(--n1sf-ink);
	color: #fff;
	border-radius: 10px;
	padding: 15px 26px;
	font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	cursor: pointer;
	width: 100%;
	max-width: 320px;
}

.n1sf-big:hover {
	opacity: 0.9;
	color: #fff;
}

.n1sf-big[disabled] {
	opacity: 0.6;
	cursor: default;
}

.n1sf-ghost {
	appearance: none;
	border: 1px solid var(--n1sf-line);
	background: #fff;
	color: var(--n1sf-ink-2);
	border-radius: 10px;
	padding: 12px 20px;
	font: 600 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	cursor: pointer;
	margin-top: 10px;
	width: 100%;
	max-width: 320px;
}

.n1sf-ghost:hover {
	border-color: var(--n1sf-ink-3);
	color: var(--n1sf-ink);
}

.n1sf-link {
	appearance: none;
	border: 0;
	background: none;
	color: var(--n1sf-blue);
	font: 600 12.5px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	cursor: pointer;
	text-decoration: underline;
	padding: 6px 2px;
}

.n1sf-link:hover {
	opacity: 0.75;
}

/* ---------- 检测到的位置卡 ---------- */
.n1sf-detected {
	background: #f4f8f6;
	border: 1px solid #d9e6e1;
	border-radius: 12px;
	padding: 16px 18px;
	text-align: left;
	margin: 0 0 16px;
}

.n1sf-detected .n1sf-k {
	font: 600 10.5px/1 ui-monospace, Consolas, monospace;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--n1sf-ok);
	margin-bottom: 6px;
}

.n1sf-detected .n1sf-v {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 3px;
	color: var(--n1sf-ink);
}

.n1sf-detected .n1sf-m {
	font-size: 12.5px;
	color: var(--n1sf-ink-3);
	line-height: 1.5;
}

.n1sf-detected.n1sf-far {
	background: #fdf6f5;
	border-color: #f3d6d4;
}

.n1sf-detected.n1sf-far .n1sf-k {
	color: #8d2f2a;
}

/* ============================================================
 * 城市选择按钮组
 * ========================================================= */
.n1sf-citywrap {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
}

.n1sf-city {
	border: 1px solid var(--n1sf-line);
	background: #fff;
	border-radius: 999px;
	padding: 7px 13px;
	font: 600 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--n1sf-ink-2);
	cursor: pointer;
}

.n1sf-city[aria-pressed="true"] {
	border-color: var(--n1sf-ink);
	box-shadow: inset 0 0 0 1px var(--n1sf-ink);
	color: var(--n1sf-ink);
}

/* ============================================================
 * 步骤三：工具条 / 品牌筛选
 * ========================================================= */
.n1sf-tools {
	padding: 10px 20px;
	border-bottom: 1px solid var(--n1sf-line);
	background: var(--n1sf-paper-2);
	flex: 0 0 auto;
	display: flex;
	gap: 7px;
	flex-wrap: wrap;
	align-items: center;
}

.n1sf-chip {
	border: 1px solid var(--n1sf-line);
	background: #fff;
	border-radius: 999px;
	padding: 6px 11px;
	font: 600 11.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--n1sf-ink-2);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.n1sf-chip .n1sf-cdot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.n1sf-chip[aria-pressed="false"] {
	opacity: 0.45;
}

.n1sf-sep {
	width: 10px;
	display: inline-block;
}

/* ============================================================
 * 状态条 / 门店行
 * ========================================================= */
.n1sf-band {
	display: flex;
	gap: 9px;
	align-items: center;
	padding: 11px 20px;
	font-size: 12.5px;
	color: var(--n1sf-ink-3);
	border-bottom: 1px solid #f1f0ec;
	background: #fcfbf9;
	line-height: 1.55;
}

.n1sf-band b {
	color: var(--n1sf-ink);
}

.n1sf-band.n1sf-err {
	color: #8d2f2a;
	background: #fdf6f5;
}

.n1sf-store {
	display: flex;
	gap: 12px;
	padding: 12px 20px;
	border-bottom: 1px solid #f4f3ef;
	align-items: flex-start;
}

.n1sf-store .n1sf-pin {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex: 0 0 auto;
	margin-top: 6px;
}

.n1sf-store .n1sf-info {
	flex: 1 1 auto;
	min-width: 0;
}

.n1sf-store .n1sf-nm {
	font-weight: 650;
	font-size: 14px;
	display: flex;
	gap: 8px;
	align-items: baseline;
	flex-wrap: wrap;
	line-height: 1.4;
	color: var(--n1sf-ink);
}

.n1sf-store .n1sf-tag {
	font: 600 9.5px/1 ui-monospace, Consolas, monospace;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 3px 6px;
	border-radius: 4px;
	background: #eef4f2;
	color: var(--n1sf-ok);
}

.n1sf-store .n1sf-ad {
	font-size: 12.6px;
	color: var(--n1sf-ink-3);
	margin-top: 2px;
	line-height: 1.5;
	word-break: break-word;
}

.n1sf-store .n1sf-dist {
	font: 600 11.5px/1 ui-monospace, Consolas, monospace;
	color: var(--n1sf-ok);
	margin-top: 5px;
}

.n1sf-store .n1sf-act {
	flex: 0 0 auto;
}

.n1sf-nav {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: 1px solid var(--n1sf-line);
	border-radius: 8px;
	padding: 8px 11px;
	font: 600 11.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--n1sf-ink);
	text-decoration: none;
	white-space: nowrap;
}

.n1sf-nav:hover {
	border-color: var(--n1sf-ink);
	background: var(--n1sf-paper-2);
	color: var(--n1sf-ink);
}

.n1sf-store.n1sf-nearest {
	background: #f7fbf8;
}

/* ============================================================
 * 底部
 * ========================================================= */
.n1sf-foot {
	padding: 13px 20px 15px;
	border-top: 1px solid var(--n1sf-line);
	background: var(--n1sf-paper-2);
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--n1sf-ink-3);
	line-height: 1.6;
}

.n1sf-foot a {
	color: var(--n1sf-ok);
	font-weight: 600;
	text-decoration: underline;
}

/* ============================================================
 * 移动端：面板铺满
 * ========================================================= */
@media (max-width: 720px) {
	.n1sf-panel {
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		border-radius: 0;
		max-width: none;
	}

	.n1sf-store {
		flex-wrap: wrap;
	}

	.n1sf-store .n1sf-act {
		width: 100%;
		display: flex;
		justify-content: flex-end;
	}

	.n1sf-gate {
		padding: 26px 18px;
	}
}

/* 打开时锁滚动（由 JS 加在 body 上） */
body.n1sf-lock {
	overflow: hidden;
}
