/* 접수 달력 (calendar.js) — used by the WordPress plugin and copied into the mobile app.
   Selectors are prefixed with .lhn / .lhn-root so theme button, heading and paragraph styles do not leak in. */
.lhn-cal {
	--cal-accent: var(--lhn-accent, #2563eb);
	--cal-start: #2563eb;
	--cal-end: #dc2626;
	--cal-line: var(--lhn-border, rgba(127, 127, 127, 0.28));
	--cal-muted: var(--lhn-muted, #6b7280);
	display: grid;
	gap: 12px;
	min-width: 0;
	word-break: keep-all;
	overflow-wrap: break-word;
}

/* Month bar */
.lhn-cal-bar {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 44px auto;
	align-items: center;
	gap: 6px;
}
.lhn-cal-title {
	text-align: center;
	font-size: 20px;
	font-weight: 800;
}
.lhn .lhn-cal button,
.lhn-root .lhn-cal button {
	margin: 0;
	font: inherit;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
}
.lhn .lhn-cal .lhn-cal-nav,
.lhn-root .lhn-cal .lhn-cal-nav {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--cal-line);
	border-radius: 12px;
	background: #fff;
	color: inherit;
	font-size: 24px;
	font-weight: 700;
}
.lhn .lhn-cal .lhn-cal-today,
.lhn-root .lhn-cal .lhn-cal-today {
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--cal-accent);
	border-radius: 12px;
	background: #fff;
	color: var(--cal-accent);
	font-size: 15px;
	font-weight: 700;
}

/* Region filter + legend */
.lhn-cal-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
}
.lhn .lhn-cal .lhn-cal-region,
.lhn-root .lhn-cal .lhn-cal-region {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--cal-line);
	border-radius: 10px;
	background-color: #fff;
	color: inherit;
	font: inherit;
	font-size: 15px;
}
.lhn-cal-legend { display: flex; gap: 12px; font-size: 13px; color: var(--cal-muted); }
.lhn-cal-key { display: inline-flex; align-items: center; gap: 5px; }
.lhn-cal-key::before { content: ''; width: 10px; height: 10px; border-radius: 3px; }
.lhn-cal-key-start::before { background: var(--cal-start); }
.lhn-cal-key-end::before { background: var(--cal-end); }

.lhn .lhn-cal p.lhn-cal-summary,
.lhn-root .lhn-cal p.lhn-cal-summary {
	margin: 0;
	padding: 0;
	font-size: 14px;
	color: var(--cal-muted);
}

/* Month grid */
.lhn-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	padding: 10px 8px;
	border: 1px solid var(--cal-line);
	border-radius: 16px;
	background: #fff;
}
.lhn-cal-week {
	padding: 2px 0 6px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: var(--cal-muted);
}
.lhn-cal-week.is-sun, .lhn-cal-day.is-sun .lhn-cal-num { color: #dc2626; }
.lhn-cal-week.is-sat, .lhn-cal-day.is-sat .lhn-cal-num { color: #2563eb; }
.lhn .lhn-cal .lhn-cal-day,
.lhn-root .lhn-cal .lhn-cal-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 3px;
	min-width: 0;
	min-height: 54px;
	padding: 5px 0 4px;
	border: 1.5px solid transparent;
	border-radius: 12px;
	background: transparent;
	color: #1f2937;
}
.lhn .lhn-cal .lhn-cal-day:hover,
.lhn-root .lhn-cal .lhn-cal-day:hover { background: #f1f5f9; color: #1f2937; }
.lhn-cal-day.is-past .lhn-cal-num { opacity: 0.45; }
.lhn-cal-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font-size: 15px;
	font-weight: 600;
}
.lhn-cal-day.is-today .lhn-cal-num { background: #e0e7ff; color: #1e3a8a; font-weight: 800; opacity: 1; }
.lhn .lhn-cal .lhn-cal-day.is-selected,
.lhn-root .lhn-cal .lhn-cal-day.is-selected { border-color: var(--cal-accent); background: #eff6ff; }
.lhn-cal-day.is-selected .lhn-cal-num { background: var(--cal-accent); color: #fff; opacity: 1; }
.lhn-cal-marks { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 15px; }
.lhn-cal-mark {
	min-width: 15px;
	height: 15px;
	padding: 0 3px;
	border-radius: 5px;
	color: #fff;
	font-size: 10px;
	font-style: normal;
	font-weight: 800;
	line-height: 15px;
	text-align: center;
}
.lhn-cal-mark-start { background: var(--cal-start); }
.lhn-cal-mark-end { background: var(--cal-end); }

/* Selected day */
.lhn-cal-list { display: grid; gap: 14px; }
.lhn .lhn-cal h3.lhn-cal-date,
.lhn-root .lhn-cal h3.lhn-cal-date {
	margin: 6px 0 0;
	padding: 0;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
}
.lhn-cal-section { display: grid; gap: 8px; }
.lhn .lhn-cal h3.lhn-cal-section-title,
.lhn-root .lhn-cal h3.lhn-cal-section-title {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
}
.lhn-cal-section-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--cal-muted); }
.lhn-cal-section-end .lhn-cal-section-title::before { background: var(--cal-end); }
.lhn-cal-section-start .lhn-cal-section-title::before { background: var(--cal-start); }
.lhn-cal-section-count { color: var(--cal-muted); font-weight: 700; }
.lhn-cal-items { display: grid; gap: 8px; }
.lhn .lhn-cal a.lhn-cal-item,
.lhn-root .lhn-cal a.lhn-cal-item {
	display: grid;
	gap: 5px;
	padding: 14px 16px;
	border: 1px solid var(--cal-line);
	border-radius: 14px;
	background: #fff;
	color: inherit;
	text-decoration: none;
}
.lhn .lhn-cal a.lhn-cal-item:hover,
.lhn-root .lhn-cal a.lhn-cal-item:hover { border-color: var(--cal-accent); }
.lhn-cal-item-head { display: flex; flex-wrap: wrap; gap: 6px; }
.lhn-cal-type,
.lhn-cal-dday {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
}
.lhn-cal-type { background: #eef2ff; color: #3730a3; }
.lhn-cal-dday-open { background: #dcfce7; color: #166534; }
.lhn-cal-dday-urgent { background: #fee2e2; color: #b91c1c; }
.lhn-cal-dday-soon { background: #dbeafe; color: #1d4ed8; }
.lhn-cal-dday-closed { background: #f3f4f6; color: #6b7280; }
.lhn-cal-item-title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}
.lhn-cal-item-meta { font-size: 13px; color: var(--cal-muted); }
.lhn .lhn-cal .lhn-cal-more,
.lhn-root .lhn-cal .lhn-cal-more {
	width: 100%;
	min-height: 48px;
	padding: 10px;
	border: 1px dashed var(--cal-line);
	border-radius: 12px;
	background: #fff;
	color: var(--cal-accent);
	font-size: 15px;
	font-weight: 700;
}
.lhn .lhn-cal p.lhn-cal-empty,
.lhn-root .lhn-cal p.lhn-cal-empty {
	margin: 0;
	padding: 24px 12px;
	border-radius: 14px;
	background: #f8fafc;
	color: var(--cal-muted);
	text-align: center;
}

@media (max-width: 380px) {
	.lhn-cal-grid { gap: 2px; padding: 8px 4px; }
	.lhn .lhn-cal .lhn-cal-day,
	.lhn-root .lhn-cal .lhn-cal-day { min-height: 50px; }
	.lhn-cal-mark { min-width: 13px; padding: 0 2px; font-size: 9px; }
}
