:root {
	--ma-accent: #f97316;
	--ma-accent-deep: #ea580c;
	--ma-bg: #f9fafb;
	--ma-card: #ffffff;
	--ma-line: #e5e7eb;
	--ma-text: #111827;
	--ma-muted: #6b7280;
	--ma-amber-bg: #fef3e2;
	--ma-amber-text: #c2410c;
	--ma-green-bg: #d1fae5;
	--ma-green-text: #065f46;
	--ma-blue-bg: #dbeafe;
	--ma-blue-text: #1e40af;
	--ma-purple-bg: #ede9fe;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	background: #ffffff;
	color: var(--ma-text);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang TC", "PingFang SC", "Microsoft JhengHei", sans-serif;
}

button {
	font: inherit;
	cursor: pointer;
}

.ma-page {
	max-width:100%;
	min-height: 100vh;
	margin: 0 auto;
	background: #ffffff;
}

.ma-statusbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px 8px;
	font-size: 14px;
	font-weight: 700;
}

.ma-statusbar__icons {
	display: flex;
	gap: 6px;
	align-items: center;
}

.ma-statusbar__icons span {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #111111;
}

.ma-statusbar__icons .battery {
	width: 13px;
	height: 9px;
	border-radius: 3px;
	background: #a7e86a;
	position: relative;
}

.ma-statusbar__icons .battery::after {
	content: "";
	position: absolute;
	right: -3px;
	top: 2px;
	width: 2px;
	height: 5px;
	border-radius: 2px;
	background: #a7e86a;
}

.ma-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px 18px;
	position: sticky;
	top: 0;
	z-index: 5;
	border-bottom: 1px solid var(--ma-line);
	background: #ffffff;
}

.ma-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
}

.ma-back img {
	width: 18px;
	height: 18px;
	display: block;
}

.ma-header h1 {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
}

.ma-main {
	min-height: calc(100vh - 165px);
	padding: 16px 16px 88px;
	background: var(--ma-bg);
	overflow: auto;
}

.ma-banner {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	padding: 14px 15px;
	border: 1px solid #fed7aa;
	border-radius: 14px;
	background: var(--ma-amber-bg);
}

.ma-banner__icon {
	width: 18px;
	height: 18px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	flex: 0 0 auto;
}

.ma-banner p {
	margin: 0;
	color: #92400e;
	font-size: 12px;
	line-height: 1.5;
}

.ma-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 16px;
}

.ma-empty-state {
	padding: 20px 18px;
	border: 1px solid var(--ma-line);
	border-radius: 16px;
	background: var(--ma-card);
	text-align: center;
}

.ma-empty-state strong {
	display: block;
	font-size: 14px;
	line-height: 1.45;
	font-weight: 700;
}

.ma-empty-state p {
	margin: 6px 0 0;
	color: var(--ma-muted);
	font-size: 12px;
	line-height: 1.55;
}

.ma-card {
	padding: 15px;
	border: 1px solid var(--ma-line);
	border-radius: 16px;
	background: var(--ma-card);
}

.ma-card__head {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.ma-card__icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex: 0 0 40px;
}

.ma-card__icon.is-amber {
	background: var(--ma-amber-bg);
}

.ma-card__icon.is-purple {
	background: var(--ma-purple-bg);
}

.ma-card__icon.is-green {
	background: var(--ma-green-bg);
}

.ma-card__icon.is-zf {
	background: #fff1e5;
	color: #f97316;
	font-size: 22px;
	font-weight: 800;
}

.ma-card__icon.is-hh {
	background: #ede9fe;
	color: #7c3aed;
	font-size: 22px;
	font-weight: 800;
}

.ma-card__icon.is-zf-green {
	background: #d1fae5;
	color: #047857;
	font-size: 22px;
	font-weight: 800;
}

.ma-card__body {
	min-width: 0;
	flex: 1 1 auto;
}

.ma-card__body h2 {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 700;
}

.ma-card__body h2 a,
.ma-card__title-link {
	color: inherit;
	text-decoration: none;
}

.ma-card__body h2 a:active,
.ma-card__title-link:active {
	opacity: 0.7;
}

.ma-card__org {
	margin-top: 2px;
	color: var(--ma-muted);
	font-size: 12px;
	line-height: 1.4;
}

.ma-tag {
	padding: 3px 8px;
	border-radius: 20px;
	font-size: 10px;
	line-height: 1.4;
	font-weight: 700;
	white-space: nowrap;
	flex: 0 0 auto;
}

.ma-tag.is-free {
	background: var(--ma-green-bg);
	color: var(--ma-green-text);
}

.ma-tag.is-online {
	background: var(--ma-blue-bg);
	color: var(--ma-blue-text);
}

.ma-tag.is-paid {
	background: var(--ma-amber-bg);
	color: var(--ma-amber-text);
}

.ma-card__desc {
	margin: 12px 0 0;
	color: var(--ma-muted);
	font-size: 12px;
	line-height: 1.5;
}

.ma-page--en .ma-banner {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.ma-page--en .ma-banner__icon {
	border: 1px solid #60a5fa;
	color: #2563eb;
	background: #ffffff;
}

.ma-page--en .ma-banner p {
	color: #1d4ed8;
	font-size: 12px;
	line-height: 1.45;
}

.ma-page--en .ma-card {
	box-shadow: 0 3px 10px rgba(15, 23, 42, 0.03);
}

.ma-page--en .ma-card__desc {
	font-size: 12px;
	line-height: 1.5;
}

.ma-page--en .ma-main {
	padding-bottom: 24px;
}

.ma-page--en .ma-card__org {
	font-size: 13px;
}

.ma-page--en .ma-card__meta {
	gap: 14px;
	margin-top: 10px;
	font-size: 12px;
}

.ma-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
	color: var(--ma-muted);
	font-size: 12px;
	line-height: 1.4;
}

.ma-card__actions {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-top: 16px;
}

.ma-card[data-attended="false"] .ma-card__actions {
	grid-template-columns: 1fr;
}

.ma-btn {
	width: 100%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.4;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	text-decoration: none;
	cursor: pointer;
}

.ma-btn--status {
	background: #f1f5f9;
	color: #64748b;
	border-color: #e2e8f0;
	font-weight: 600;
}

.ma-btn--status:disabled {
	opacity: 1;
	cursor: default;
}

.ma-btn--action {
	border-color: var(--ma-accent);
	background: #ffffff;
	color: var(--ma-accent);
}

.ma-btn--action.ma-attend-btn:active {
	transform: scale(0.98);
}

.ma-card[data-attended="true"] .ma-btn--action {
	background: linear-gradient(135deg, var(--ma-accent) 0%, var(--ma-accent-deep) 100%);
	color: #ffffff;
	border: none;
}

.ma-bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	max-width:100%;
	margin: 0 auto;
	height: 70px;
	padding: 1px 8px 0;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	align-items: center;
	border-top: 1px solid var(--ma-line);
	background: #ffffff;
}

.ma-bottom-nav a {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1px;
	text-decoration: none;
	text-align: center;
	color: #111827;
	font-size: 13px;
	line-height: 1.3;
	white-space: nowrap;
}

.ma-bottom-nav a span {
	font-size: 16px;
	line-height: 1;
}

.ma-bottom-nav a.is-active {
	color: var(--ma-accent);
}

@media (min-width: 768px) {
	body {
		padding: 0;
		background: #ffffff;
	}

	.ma-page {
		width: 100%;
		max-width: none;
		border-radius: 0;
		overflow: visible;
		box-shadow: none;
	}

	.ma-bottom-nav {
		left: 50%;
		right: auto;
		width: calc(100vw - 32px);
		max-width: 960px;
		max-width: none;
		transform: translateX(-50%);
	}
}
