:root {
	--bg: #f4f6f8;
	--surface: #ffffff;
	--wash: #eef2f5;
	--line: #e3e8ee;
	--ink: #0f1419;
	--mute: #5b6b7c;
	--blue: #1da1f2;
	--blue-deep: #0f7ec8;
	--blue-dim: rgba(29, 161, 242, 0.12);
	--green: #17bf63;
	--radius: 18px;
	--radius-pill: 999px;
	--header-h: 56px;
	--tabbar-h: calc(58px + env(safe-area-inset-bottom, 0px));
	--shadow: 0 10px 28px rgba(15, 20, 25, 0.07);
	--font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang TC",
		"Microsoft JhengHei", sans-serif;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}

body.sheet-open,
body.map-open {
	overflow: hidden;
}

button,
input,
textarea {
	font: inherit;
	color: inherit;
}

a {
	color: inherit;
	text-decoration: none;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.app {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(ellipse 80% 50% at 10% -10%, rgba(29, 161, 242, 0.14), transparent 55%),
		radial-gradient(ellipse 60% 40% at 100% 0%, rgba(15, 126, 200, 0.08), transparent 50%),
		var(--bg);
}

/* ── Header ── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: var(--header-h);
	padding: 8px 16px;
	padding-top: calc(8px + env(safe-area-inset-top, 0px));
	background: rgba(255, 255, 255, 0.92);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.site-logo img {
	display: block;
	height: 24px;
	width: auto;
	max-width: 128px;
	object-fit: contain;
}

.site-header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--ink);
	cursor: pointer;
}

.icon-btn:hover {
	background: var(--wash);
	color: var(--blue);
}

.icon-btn svg {
	width: 22px;
	height: 22px;
}

.nav-account {
	position: relative;
}

.nav-account.is-hidden,
.nav-login.is-hidden {
	display: none !important;
}

.nav-account-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	cursor: pointer;
}

.nav-account-avatar {
	width: 28px;
	height: 28px;
	border-radius: var(--radius-pill);
	object-fit: cover;
	background: var(--wash);
}

.nav-account-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 40;
	min-width: 180px;
	padding: 8px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--surface);
	box-shadow: var(--shadow);
}

.nav-account-name {
	margin: 0;
	padding: 8px 12px;
	font-size: 14px;
	font-weight: 700;
}

.nav-account-link,
.nav-account-logout {
	display: block;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
}

.nav-account-link:hover {
	background: var(--wash);
	color: var(--blue);
}

.nav-account-logout {
	color: var(--mute);
}

.nav-account-logout:hover {
	background: var(--wash);
	color: #e0245e;
}

/* ── Home ── */
.home {
	flex: 1;
	width: min(720px, 100%);
	margin: 0 auto;
	padding: 8px 16px calc(var(--tabbar-h) + 24px);
}

.hero {
	padding: 20px 0 8px;
	animation: rise 0.7s var(--ease) both;
}

.hero-kicker {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	color: var(--blue);
}

.hero-title {
	margin: 0;
	font-size: clamp(28px, 7.2vw, 40px);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1.12;
}

.hero-sub {
	margin: 10px 0 0;
	color: var(--mute);
	font-size: 15px;
	font-weight: 500;
}

.search-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
	padding: 6px 6px 6px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--surface);
	box-shadow: var(--shadow);
}

.search-bar:focus-within {
	border-color: rgba(29, 161, 242, 0.45);
	box-shadow: 0 0 0 4px var(--blue-dim), var(--shadow);
}

.search-bar-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: var(--mute);
}

.search-input {
	flex: 1;
	min-width: 0;
	height: 40px;
	border: 0;
	outline: none;
	background: transparent;
	font-size: 15px;
}

.search-go {
	height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--blue);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.search-go:hover {
	background: var(--blue-deep);
}

.quick-row {
	display: flex;
	gap: 8px;
	margin-top: 16px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: none;
}

.quick-row::-webkit-scrollbar {
	display: none;
}

.quick-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--surface);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

.quick-chip em {
	font-style: normal;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--mute);
	text-transform: uppercase;
}

.quick-chip.is-primary {
	background: var(--blue);
	border-color: var(--blue);
	color: #fff;
}

.quick-chip:disabled {
	opacity: 0.72;
	cursor: default;
}

.quick-emoji {
	font-size: 15px;
	line-height: 1;
}

/* Feature cards */
.feature-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin: 20px 0 8px;
}

.feature-card {
	text-align: left;
	padding: 20px 18px;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: var(--surface);
	box-shadow: var(--shadow);
	cursor: pointer;
	transition: transform 0.2s var(--ease), border-color 0.2s ease;
}

.feature-card:hover {
	transform: translateY(-2px);
	border-color: rgba(29, 161, 242, 0.35);
}

.feature-card--lazy {
	background: linear-gradient(160deg, #ffffff 0%, #eef7fd 100%);
}

.feature-card--mrt {
	background: linear-gradient(160deg, #ffffff 0%, #f3f6f8 100%);
}

.feature-label {
	margin: 0;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: var(--blue);
	text-transform: uppercase;
}

.feature-title {
	margin: 8px 0 0;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.feature-text {
	margin: 6px 0 0;
	color: var(--mute);
	font-size: 14px;
}

.feature-cta {
	display: inline-flex;
	margin-top: 14px;
	padding: 8px 14px;
	border-radius: var(--radius-pill);
	background: var(--ink);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
}

.feature-card--mrt .feature-cta {
	background: var(--blue);
}

/* Sections */
.home-section {
	margin-top: 28px;
}

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.section-title {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.section-sub {
	margin: 4px 0 0;
	color: var(--mute);
	font-size: 13px;
}

.text-link {
	border: 0;
	background: transparent;
	color: var(--blue);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
}

.pill-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--blue);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

.pill-btn:hover {
	background: var(--blue-deep);
}

.pill-btn--ghost {
	background: var(--wash);
	color: var(--ink);
}

.pill-btn--ghost:hover {
	background: #e4eaf0;
}

.pill-btn--wide {
	width: 100%;
	min-height: 48px;
	font-size: 15px;
}

/* Store cards */
.store-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(220px, 72%);
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 6px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.store-rail::-webkit-scrollbar {
	display: none;
}

.store-card {
	scroll-snap-align: start;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--surface);
	overflow: hidden;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(15, 20, 25, 0.04);
}

.store-card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--wash);
}

.store-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.store-card-logo,
.spotlight-logo,
.mrt-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-pill);
	background: var(--blue);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	border: 2px solid #fff;
	box-shadow: 0 4px 12px rgba(15, 20, 25, 0.18);
	object-fit: cover;
	overflow: hidden;
	flex-shrink: 0;
}

.store-card-logo--fallback,
.spotlight-logo--fallback,
.mrt-logo--fallback {
	background: var(--blue);
}

.store-card-logo {
	position: absolute;
	left: 10px;
	bottom: -14px;
}

.store-card-status {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 4px 8px;
	border-radius: var(--radius-pill);
	font-size: 11px;
	font-weight: 700;
	background: rgba(15, 20, 25, 0.72);
	color: #fff;
}

.store-card-status.is-open {
	background: rgba(23, 191, 99, 0.92);
}

.store-card-body {
	padding: 20px 14px 14px;
}

.store-card-name {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.store-card-meta,
.store-card-tags {
	margin: 4px 0 0;
	color: var(--mute);
	font-size: 13px;
}

.store-card-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 8px;
}

.store-card-rating {
	font-weight: 800;
	color: var(--ink);
	font-size: 13px;
}

/* Spotlight */
.store-spotlight {
	border-radius: 24px;
	overflow: hidden;
}

.spotlight {
	border: 1px solid var(--line);
	border-radius: 24px;
	background: var(--surface);
	overflow: hidden;
	cursor: pointer;
	box-shadow: var(--shadow);
}

.spotlight-cover {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	background: var(--wash);
}

.spotlight-body {
	display: flex;
	gap: 12px;
	padding: 16px;
}

.spotlight-kicker {
	margin: 0;
	font-size: 12px;
	font-weight: 800;
	color: var(--blue);
}

.spotlight-name {
	margin: 4px 0 0;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.spotlight-meta,
.spotlight-tags {
	margin: 6px 0 0;
	color: var(--mute);
	font-size: 13px;
}

/* MRT preview */
.mrt-preview {
	display: grid;
	gap: 10px;
}

.mrt-preview-station {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	color: var(--mute);
}

.mrt-row {
	display: grid;
	gap: 10px;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: var(--surface);
	cursor: pointer;
}

.mrt-exit {
	font-size: 13px;
	font-weight: 800;
	color: var(--blue);
}

.mrt-row-main {
	display: flex;
	gap: 12px;
	align-items: center;
}

.mrt-row-copy {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.mrt-row-copy strong {
	font-size: 16px;
	letter-spacing: -0.02em;
}

.mrt-row-copy span {
	color: var(--mute);
	font-size: 13px;
}

.mrt-row-tags {
	color: var(--ink) !important;
	font-weight: 600;
}

.mrt-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mrt-back {
	margin-bottom: 12px;
}

/* Feed block */
.home-section--feed {
	border: 1px solid var(--line);
	border-radius: 24px;
	background: var(--surface);
	overflow: hidden;
	padding-bottom: 8px;
}

.home-section--feed .section-head {
	padding: 18px 16px 0;
	margin-bottom: 0;
}

.home-section--feed .composer {
	margin-top: 8px;
}

/* Tabbar */
.tabbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	height: var(--tabbar-h);
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: rgba(255, 255, 255, 0.96);
	border-top: 1px solid var(--line);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.tabbar-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 0;
	background: transparent;
	color: var(--mute);
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
}

.tabbar-item svg {
	width: 22px;
	height: 22px;
}

.tabbar-item.is-active,
.tabbar-item:hover {
	color: var(--blue);
}

/* Sheets */
.sheet {
	position: fixed;
	inset: 0;
	z-index: 60;
}

.sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 20, 25, 0.42);
}

.sheet-panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: min(88dvh, 720px);
	display: flex;
	flex-direction: column;
	border-radius: 24px 24px 0 0;
	background: var(--surface);
	box-shadow: 0 -12px 40px rgba(15, 20, 25, 0.18);
	animation: sheet-up 0.28s var(--ease);
}

.sheet-panel--tall {
	max-height: min(92dvh, 820px);
}

.sheet-handle {
	width: 40px;
	height: 4px;
	margin: 10px auto 0;
	border-radius: var(--radius-pill);
	background: #d0d7de;
}

.sheet-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px 8px;
}

.sheet-kicker {
	margin: 0;
	font-size: 12px;
	font-weight: 800;
	color: var(--blue);
	letter-spacing: 0.06em;
}

.sheet-title {
	margin: 4px 0 0;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.sheet-body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 16px 16px;
	-webkit-overflow-scrolling: touch;
}

.sheet-foot {
	display: flex;
	gap: 8px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--line);
	background: var(--surface);
}

.lazy-block + .lazy-block {
	margin-top: 18px;
}

.lazy-q {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 800;
}

.chip-group,
.station-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.choice-chip,
.station-btn {
	min-height: 38px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--wash);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.choice-chip.is-on,
.station-btn:hover {
	background: var(--blue);
	border-color: var(--blue);
	color: #fff;
}

.station-btn {
	min-width: calc(50% - 4px);
	justify-content: center;
	display: inline-flex;
	align-items: center;
	background: var(--surface);
}

.lazy-result-label {
	margin: 0 0 12px;
	font-weight: 800;
}

.lazy-result-note {
	margin: 12px 0 0;
	color: var(--mute);
	font-size: 13px;
}

/* Map overlay */
.map-overlay {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: flex;
	flex-direction: column;
	background: #d9e3eb;
}

.map-overlay[hidden],
.sheet[hidden] {
	display: none !important;
}

.map-top {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	padding: 8px 12px;
	padding-top: calc(8px + env(safe-area-inset-top, 0px));
	background: rgba(255, 255, 255, 0.94);
	border-bottom: 1px solid var(--line);
}

.map-top-title {
	margin: 0;
	font-weight: 800;
}

.map-top-spacer {
	width: 40px;
	margin-left: auto;
}

.map-stage {
	flex: 1;
	position: relative;
	min-height: 0;
	background: #d9e3eb;
}

.map-stage .leaflet-container {
	width: 100%;
	height: 100%;
	font: inherit;
}

.map-logo-pin-wrap {
	background: transparent !important;
	border: 0 !important;
}

.map-logo-pin {
	position: relative;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 3px solid #fff;
	background: var(--surface);
	box-shadow: 0 6px 14px rgba(15, 20, 25, 0.28);
	overflow: hidden;
}

.map-logo-pin img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.map-logo-pin::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -9px;
	transform: translateX(-50%);
	border: 7px solid transparent;
	border-top-color: #fff;
	filter: drop-shadow(0 2px 2px rgba(15, 20, 25, 0.15));
}

.map-logo-pin--fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--blue);
	color: #fff;
	font-weight: 800;
}

.map-logo-pin--fallback span {
	position: relative;
	z-index: 1;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
	background: rgba(29, 161, 242, 0.22) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
	background: var(--blue) !important;
	color: #fff !important;
	font-weight: 800 !important;
}

.rail-empty {
	margin: 0;
	padding: 20px 16px;
	border: 1px dashed var(--line);
	border-radius: 16px;
	color: var(--mute);
	font-size: 14px;
	background: var(--surface);
}

.store-rail.is-empty {
	display: block;
	grid-auto-flow: unset;
	overflow: visible;
}

.map-sheet {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
	background: transparent;
	pointer-events: none;
}

.map-sheet-card {
	pointer-events: auto;
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 12px;
	padding: 12px;
	border-radius: 20px 20px 16px 16px;
	background: var(--surface);
	box-shadow: 0 -4px 28px rgba(15, 20, 25, 0.18);
	animation: sheet-up 0.25s var(--ease);
}

.map-sheet-card img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 14px;
	background: var(--wash);
}

.map-sheet-top {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.map-sheet-top p {
	margin: 2px 0 0;
	color: var(--mute);
	font-size: 12px;
}

.map-sheet-top strong {
	font-size: 16px;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes sheet-up {
	from {
		transform: translateY(24px);
		opacity: 0.6;
	}
	to {
		transform: none;
		opacity: 1;
	}
}

@media (min-width: 760px) {
	.home {
		padding-bottom: 40px;
	}

	.tabbar {
		display: none;
	}

	.feature-row {
		grid-template-columns: 1fr 1fr;
	}

	.store-rail {
		grid-auto-columns: minmax(240px, 260px);
	}

	.site-header {
		padding-left: max(24px, calc(50% - 360px));
		padding-right: max(24px, calc(50% - 360px));
	}
}

/* Legacy top shell (profile / older pages) */
.page-shell {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	width: min(920px, 100%);
	margin: 0 auto;
	padding: 16px 16px 0;
}

.top {
	position: sticky;
	top: 12px;
	z-index: 20;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	height: 72px;
	padding: 0 20px 0 24px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow);
}

.top-brand {
	display: inline-flex;
	align-items: center;
	justify-self: start;
}

.top-brand img {
	display: block;
	height: 26px;
	width: auto;
	max-width: 148px;
	object-fit: contain;
}

.top-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 6px;
	background: var(--wash);
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
}

.top-nav a,
.top-nav button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--mute);
	cursor: pointer;
}

.top-nav .is-hidden {
	display: none !important;
}

.top-nav a:hover,
.top-nav button:hover,
.top-nav a.active {
	background: var(--surface);
	color: var(--blue);
}

.top-nav svg {
	width: 28px;
	height: 28px;
}

.top-menu {
	justify-self: end;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--surface);
	cursor: pointer;
}

.feed {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	width: min(600px, 100%);
	margin: 20px auto 0;
	border: 1px solid var(--line);
	border-radius: 32px;
	background: var(--surface);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.feed-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

#feed-list {
	padding-bottom: 8px;
}

.composer {
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 12px;
	padding: 20px 20px 16px;
	border-bottom: 1px solid var(--line);
}

.composer-avatar {
	width: 44px;
	height: 44px;
	border-radius: var(--radius-pill);
	object-fit: cover;
	background: var(--wash);
}

.composer-body {
	min-width: 0;
}

.composer-input {
	width: 100%;
	min-height: 52px;
	padding: 10px 0 0;
	border: 0;
	background: transparent;
	resize: none;
	outline: none;
	font-size: 18px;
	line-height: 1.35;
}

.composer-input::placeholder {
	color: var(--mute);
}

.composer-input:read-only {
	cursor: pointer;
}

.composer-actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 12px;
}

.composer-post {
	min-width: 72px;
	height: 38px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--blue);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	opacity: 0.45;
}

.composer-post.is-ready {
	opacity: 1;
}

.composer-post.is-ready:hover {
	background: var(--blue-deep);
}

.post {
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 12px;
	padding: 14px 20px 0;
	border-bottom: 1px solid var(--line);
}

.post:hover {
	background: var(--wash);
}

.post-avatar {
	width: 44px;
	height: 44px;
	border-radius: var(--radius-pill);
	object-fit: cover;
	background: var(--wash);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
}

.post-avatar--fallback {
	background: linear-gradient(135deg, #0d8bd9, var(--blue));
}

.post-main {
	min-width: 0;
	padding-bottom: 14px;
}

.post-head {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
}

.post-user {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	font-weight: 700;
}

.post-user-link:hover {
	color: var(--blue);
	text-decoration: underline;
}

.post-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	flex-shrink: 0;
	color: var(--mute);
	font-size: 14px;
}

.post-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: -6px -8px -6px 0;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--mute);
	cursor: pointer;
}

.post-more:hover {
	background: var(--blue-dim);
	color: var(--blue);
}

.post-text {
	margin: 4px 0 0;
	font-size: 15px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}

.post-text a {
	color: var(--blue);
}

.feed-empty {
	margin: 0;
	padding: 48px 20px 56px;
	text-align: center;
	color: var(--mute);
	font-size: 15px;
}

.post-menu {
	position: relative;
}

.post-menu-panel {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	z-index: 10;
	min-width: 120px;
	padding: 6px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
	box-shadow: var(--shadow);
}

.post-menu-delete {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #e0245e;
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.post-menu-delete:hover {
	background: rgba(224, 36, 94, 0.08);
}

/* Profile */
.profile-feed {
	flex: 1;
	min-height: 0;
}

.profile-loading,
.profile-error {
	padding: 48px 20px;
	text-align: center;
	color: var(--mute);
}

.profile-error a {
	color: var(--blue);
}

.profile-header {
	display: flex;
	gap: 16px;
	padding: 24px 20px;
	border-bottom: 1px solid var(--line);
}

.profile-avatar {
	width: 80px;
	height: 80px;
	border-radius: var(--radius-pill);
	object-fit: cover;
	background: var(--wash);
	flex-shrink: 0;
}

.profile-info {
	min-width: 0;
}

.profile-name {
	margin: 0;
	font-size: 22px;
	line-height: 1.2;
}

.profile-handle {
	margin: 4px 0 0;
	color: var(--mute);
	font-size: 15px;
}

.profile-meta {
	margin: 8px 0 0;
	color: var(--mute);
	font-size: 14px;
}

.profile-edit {
	padding: 20px;
	border-bottom: 1px solid var(--line);
	background: var(--wash);
}

.profile-edit h2,
.profile-posts h2 {
	margin: 0 0 12px;
	font-size: 16px;
}

.profile-form {
	display: grid;
	gap: 14px;
}

.profile-field {
	display: grid;
	gap: 6px;
}

.profile-field > span {
	font-size: 13px;
	font-weight: 600;
	color: var(--mute);
}

.profile-field input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
	outline: none;
}

.profile-field input:focus {
	border-color: var(--blue);
	box-shadow: 0 0 0 3px var(--blue-dim);
}

.profile-field input.input-ok {
	border-color: #17bf63;
}

.profile-field input.input-bad {
	border-color: #e0245e;
}

.profile-handle-input {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
}

.profile-handle-input span {
	color: var(--mute);
	font-weight: 600;
}

.profile-handle-input input {
	border: 0;
	padding: 10px 0;
	box-shadow: none;
}

.profile-avatar-edit {
	display: flex;
	align-items: center;
	gap: 12px;
}

.profile-avatar-edit img {
	width: 56px;
	height: 56px;
	border-radius: var(--radius-pill);
	object-fit: cover;
	background: var(--wash);
}

.profile-avatar-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--surface);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.profile-hint {
	margin: 0;
	font-size: 13px;
	color: var(--mute);
}

.profile-hint--ok {
	color: #17bf63;
}

.profile-hint--bad {
	color: #e0245e;
}

.profile-form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.profile-save {
	min-width: 88px;
	height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--blue);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.profile-save:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.profile-msg {
	margin: 0;
	font-size: 14px;
}

.profile-msg--ok {
	color: #17bf63;
}

.profile-msg--err {
	color: #e0245e;
}

.profile-posts h2 {
	padding: 16px 20px 0;
}

.profile-posts .feed-empty {
	padding: 32px 20px 48px;
}

/* Login */
.page-login {
	display: grid;
	place-items: center;
	min-height: 100dvh;
	padding: 24px 16px;
}

.login-shell {
	width: min(420px, 100%);
}

.login-brand {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-bottom: 24px;
}

.login-brand img {
	display: block;
	height: 32px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
}

.login-card {
	padding: 32px 28px;
	border: 1px solid var(--line);
	border-radius: 28px;
	background: var(--surface);
	box-shadow: var(--shadow);
}

.login-card h1 {
	margin: 0 0 8px;
	font-size: 24px;
}

.login-card p {
	margin: 0 0 20px;
	color: var(--mute);
}

.login-google {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 48px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--surface);
	font-weight: 600;
}

.login-google:hover {
	background: var(--wash);
}

.login-hint {
	color: #e0245e !important;
}

.login-back {
	margin-top: 20px !important;
	margin-bottom: 0 !important;
	text-align: center;
	font-size: 14px;
}

.login-back a {
	color: var(--blue);
}

@media (max-width: 700px) {
	.page-shell {
		padding: 10px 10px 0;
	}

	.top {
		top: 8px;
		height: 64px;
		padding: 0 12px 0 14px;
		border-radius: 28px;
	}

	.top-nav a,
	.top-nav button,
	.top-menu {
		width: 42px;
		height: 42px;
	}

	.feed {
		margin-top: 14px;
		border-radius: 24px 24px 0 0;
		border-bottom: 0;
	}

	.composer {
		padding: 16px 14px 12px;
	}

	.post {
		padding: 12px 14px 0;
	}
}
