/*
 * 파일 위치: assets/css/eum_mobile.css
 * 역할: 이음 모바일 화면(/eum_mobile/*) 전용 스타일 - 디자인 가이드는 app/e-um/SPEC.md §4-1
 *
 * - 모든 규칙은 body.eum-mobile 아래로 가둔다(관리자 화면에 새지 않게).
 * - 색·모서리·간격은 아래 CSS 변수(토큰)에서만 고른다. 화면마다 색을 새로 정하지 않는다.
 * - Bootstrap 유틸리티로 표현할 수 있는 것은 마크업에 두고, 여기에는 셸과 반복 패턴만 둔다.
 */

body.eum-mobile {
	/* 바탕·카드 */
	--eum-bg: #f4f6fa;
	--eum-card-bg: #fff;
	--eum-card-radius: 16px;
	--eum-tile-radius: 12px;
	--eum-card-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
	--eum-line: rgba(0, 0, 0, 0.06);

	/* 브랜드 */
	--eum-brand: #062e85;
	--eum-brand-rgb: 6, 46, 133;
	--eum-accent: #2563eb;
	--eum-bar-secondary: #b45309;

	/* 톤 5종(배경 / 글자) */
	--eum-blue-bg: #eef4ff;
	--eum-blue: #1d4ed8;
	--eum-green-bg: #ecfdf3;
	--eum-green: #047857;
	--eum-purple-bg: #f3f0ff;
	--eum-purple: #6d28d9;
	--eum-orange-bg: #fff6ed;
	--eum-orange: #c2410c;
	--eum-red-bg: #fef2f2;
	--eum-red: #dc2626;

	/* 글자 */
	--eum-text-title: #111827;
	--eum-text: #374151;
	--eum-text-sub: #6b7280;
	--eum-text-muted: #9ca3af;

	/* 치수 */
	--eum-gutter: 16px;
	--eum-max-width: 640px;
	--eum-topbar-height: 56px;
	--eum-tabbar-height: 62px;

	/* 안전영역(노치·제스처 바). env() 를 직접 쓰지 말고 이 토큰을 쓴다 -
	   앱 웹뷰에서는 아래 html.in-app-webview 가 0 으로 끈다. */
	--eum-safe-top: env(safe-area-inset-top);
	--eum-safe-bottom: env(safe-area-inset-bottom);

	/* 모바일 컴포넌트(/wani-component-mobile) 토큰 - 위 값과 같은 것을 쓴다(한쪽만 바꾸지 않게 여기서 잇는다) */
	--wm-brand: var(--eum-brand);
	--wm-bg: var(--eum-bg);
	--wm-card-bg: var(--eum-card-bg);
	--wm-card-radius: var(--eum-card-radius);
	--wm-tile-radius: var(--eum-tile-radius);
	--wm-card-shadow: var(--eum-card-shadow);
	--wm-line: var(--eum-line);
	--wm-max-width: var(--eum-max-width);
	--wm-bar-bottom: var(--eum-tabbar-height);
	--wm-safe-top: var(--eum-safe-top);
	--wm-safe-bottom: var(--eum-safe-bottom);
	--wm-blue-bg: var(--eum-blue-bg);
	--wm-blue: var(--eum-blue);
	--wm-green-bg: var(--eum-green-bg);
	--wm-green: var(--eum-green);
	--wm-purple-bg: var(--eum-purple-bg);
	--wm-purple: var(--eum-purple);
	--wm-orange-bg: var(--eum-orange-bg);
	--wm-orange: var(--eum-orange);
	--wm-red-bg: var(--eum-red-bg);
	--wm-red: var(--eum-red);
	--wm-text-title: var(--eum-text-title);
	--wm-text: var(--eum-text);
	--wm-text-sub: var(--eum-text-sub);
	--wm-text-muted: var(--eum-text-muted);

	/* Bootstrap 변수 덮기(이 범위 안에서만).
	   --bs-body-bg 는 덮지 않는다 - offcanvas·list-group·modal 이 그 값을 배경으로 써서 회색이 된다(흰색이어야 한다). */
	--bs-body-color: var(--eum-text);
	--bs-primary: var(--eum-brand);
	--bs-primary-rgb: var(--eum-brand-rgb);
	--bs-link-color: var(--eum-accent);
	--bs-link-color-rgb: 37, 99, 235;

	margin: 0;
	background: var(--eum-bg);
	color: var(--eum-text);
	font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior-y: none;
}

/* ── 앱(웹뷰) 안에서는 안전영역 여백을 끈다 ──────────────────────
   웹뷰는 앱이 이미 상태바·내비게이션 바를 피한 자리에 놓는다. 여기서 또 넣으면
   상단바 위·탭바 아래에 빈 띠가 생긴다. 클래스는 header_meta.php 가 붙인다.
   --wm-safe-* 는 위에서 --eum-safe-* 를 이어받으므로 이 한 곳만 끄면 전부 꺼진다. */
html.in-app-webview body.eum-mobile {
	--eum-safe-top: 0px;
	--eum-safe-bottom: 0px;
}

body.eum-mobile .btn-primary {
	--bs-btn-bg: var(--eum-brand);
	--bs-btn-border-color: var(--eum-brand);
	--bs-btn-hover-bg: #05266d;
	--bs-btn-hover-border-color: #05266d;
	--bs-btn-active-bg: #041f5a;
	--bs-btn-active-border-color: #041f5a;
	--bs-btn-disabled-bg: var(--eum-brand);
	--bs-btn-disabled-border-color: var(--eum-brand);
}

body.eum-mobile .btn-outline-primary {
	--bs-btn-color: var(--eum-brand);
	--bs-btn-border-color: var(--eum-brand);
	--bs-btn-hover-bg: var(--eum-brand);
	--bs-btn-hover-border-color: var(--eum-brand);
	--bs-btn-active-bg: var(--eum-brand);
	--bs-btn-active-border-color: var(--eum-brand);
}

body.eum-mobile .nav-pills {
	--bs-nav-pills-link-active-bg: var(--eum-brand);
}

body.eum-mobile .eum-mobile-brand-text {
	color: var(--eum-brand);
}

/* 눌리는 요소 - hover 대신 :active 로 반응(모바일) */
body.eum-mobile .eum-pressable:active,
body.eum-mobile .list-group-item-action:active {
	filter: brightness(0.97);
}

/* ── 셸 ─────────────────────────────────────────── */

/* 머리·하단 바는 화면 끝까지, 본문만 --eum-max-width 로 가운데(결연교회 화면과 같은 모양) */
.eum-mobile-app {
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 auto;
	background: var(--eum-bg);
	position: relative;
}

.eum-mobile-topbar {
	position: sticky;
	top: 0;
	z-index: 1020;
	padding-top: var(--eum-safe-top);
	background: #fff;
	border-bottom: 1px solid var(--eum-line);
}

.eum-mobile-topbar-inner {
	height: var(--eum-topbar-height);
}

/* 상단 왼쪽 서비스 로고(앱 셸) */
.eum-mobile-topbar-logo {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.eum-mobile-topbar-logo img {
	height: 32px;
	width: auto;
}

.eum-mobile-org-toggle {
	max-width: 60%;
	min-width: 0;
	color: var(--eum-text-title) !important;
}

.eum-mobile-bell-badge {
	top: 4px;
	right: 0;
	font-size: 0.65rem;
	min-width: 1.15rem;
}

.eum-mobile-main {
	max-width: var(--eum-max-width);
	margin: 0 auto;
	padding: 0 var(--eum-gutter) calc(var(--eum-tabbar-height) + var(--eum-safe-bottom) + 24px);
}

.eum-mobile-tabbar {
	position: fixed;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 100%;
	z-index: 1030;
	padding-bottom: var(--eum-safe-bottom);
	background: #fff;
	border-top: 1px solid var(--eum-line);
}

.eum-mobile-tab {
	height: var(--eum-tabbar-height);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	color: var(--eum-text-muted);
	font-size: 11px;
	text-decoration: none;
}

.eum-mobile-tab .bi {
	font-size: 22px;
	line-height: 1;
}

.eum-mobile-tab.active {
	color: var(--eum-brand);
	font-weight: 700;
}

/* [더보기]는 링크가 아니라 시트를 여는 버튼이다 - 버튼 기본 모양만 지운다 */
button.eum-mobile-tab {
	border: 0;
	background: none;
	padding: 0;
}

.eum-mobile-tab.is-locked {
	color: #d1d5db;
}

.eum-mobile-tab-lock.bi {
	position: absolute;
	right: -8px;
	bottom: -2px;
	font-size: 10px;
	color: var(--eum-text-muted);
}

/* 더보기 시트 - 지금 보고 있는 화면은 옅은 브랜드 배경, 권한 없는 화면은 흐리게(누르면 안내 토스트) */
.wm-sheet-list [data-eum-mobile-more-item].is-current {
	background: var(--eum-blue-bg);
	border-radius: 12px;
}

.wm-sheet-list [data-eum-mobile-more-item].is-locked {
	opacity: .55;
}

/* 알림 offcanvas - 화면의 88%, 최대 420px */
body.eum-mobile .offcanvas-end.eum-mobile-message-drawer {
	--bs-offcanvas-width: min(88vw, 420px);
	padding-top: var(--eum-safe-top);
}

.eum-mobile-toast-container {
	bottom: calc(var(--eum-tabbar-height) + var(--eum-safe-bottom));
	z-index: 1090;
}

/* ── 화면 공통 조각 ─────────────────────────────── */

.eum-mobile-page-head {
	padding: 20px 2px 12px;
}

.eum-mobile-page-title {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	color: var(--eum-text-title);
	letter-spacing: -0.02em;
}

.eum-mobile-page-sub {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--eum-text-sub);
}

/* 섹션 카드 */
.eum-card {
	background: var(--eum-card-bg);
	border-radius: var(--eum-card-radius);
	box-shadow: var(--eum-card-shadow);
	padding: var(--eum-gutter);
	margin-bottom: 12px;
}

.eum-card-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.eum-card-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--eum-text-title);
}

.eum-card-title .bi {
	font-size: 16px;
	color: var(--eum-text-sub);
	margin-right: 6px;
}

.eum-card-desc {
	font-size: 12px;
	color: var(--eum-text-sub);
}

.eum-section-gap {
	height: 8px;
}

/* 목록 행 */
.eum-mobile-list .list-group-item {
	border-left: 0;
	border-right: 0;
	padding-top: 12px;
	padding-bottom: 12px;
}

.eum-mobile-list .list-group-item:first-child {
	border-top: 0;
}

.eum-mobile-unread-dot {
	width: 8px;
	height: 8px;
	flex: 0 0 8px;
	border-radius: 50%;
	background: var(--eum-red);
}

.eum-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.eum-min-w-0 {
	min-width: 0;
}

/* ── pajax 로딩·오류 ─────────────────────────────── */

.eum-mobile-page-loading {
	padding-top: 20px;
}

.eum-mobile-page-loading .placeholder {
	border-radius: 8px;
}

.eum-mobile-page-error {
	margin-top: 20px;
	font-size: 13px;
	word-break: break-all;
}

/* ── 현황: 흐름 칸은 wani-m-ui 의 statSplit, 슬라이드는 wani-m-slider ── */

/* ── 현황(막대 차트는 wani-m-bar-chart) ── */

/* ── 신우: 검색 · 칩 줄(입력줄·칩은 wani-m-search-box · wani-m-chip-row) ── */

.eum-members-toolbar {
	position: sticky;
	top: calc(var(--eum-topbar-height) + var(--eum-safe-top) + var(--wani-top-notice-h, 0px));
	z-index: 5;
	margin: 0 calc(var(--eum-gutter) * -1) 8px;
	padding: 8px var(--eum-gutter);
	background: var(--eum-bg);
}

/* 검색창 오른쪽 톱니 - 검색창(.wm-search-box .form-control)과 같은 높이·모양 */
.eum-members-gear-btn {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--wm-tile-radius);
	background: #fff;
	box-shadow: var(--wm-card-shadow);
	color: var(--wm-text-muted);
	font-size: 1.15rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.eum-members-gear .dropdown-toggle::after {
	display: none;
}

.eum-members-gear .dropdown-menu {
	min-width: 220px;
	z-index: 1080;
}

/* 머리 줄 왼쪽 글자 - 오른쪽 버튼 묶음(wm-button-group)의 자리를 남긴다 */
.eum-page-head-text {
	flex: 0 1 auto;
	min-width: 0;
	max-width: 50%;
}

/* 목록 오른쪽 체크박스 - 손가락으로 누르기 쉽게 칸을 넓히고, 눌러도 상세가 열리지 않는다 */
.eum-row-check {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	min-height: 36px;
	margin: -6px -8px -6px 0;
	cursor: pointer;
}

.eum-row-check .form-check-input {
	width: 22px;
	height: 22px;
	margin: 0;
	border-radius: 50%;
	cursor: pointer;
}

.eum-row-check .form-check-input:checked {
	background-color: var(--eum-brand);
	border-color: var(--eum-brand);
}

/* ── 신우: 상세 전체화면 offcanvas ─────────────────── */

body.eum-mobile .offcanvas-end.eum-member-offcanvas {
	--bs-offcanvas-width: 100%;
	max-width: var(--eum-max-width);
	right: 0; /* 머리·하단 바가 화면 끝까지라 상세도 화면 오른쪽 끝에 붙인다 */
	border-left: 1px solid var(--eum-line);
	background: var(--eum-card-bg);
	padding-top: var(--eum-safe-top);
	padding-bottom: var(--eum-safe-bottom);
}

.eum-member-offcanvas-header {
	height: var(--eum-topbar-height);
	padding: 0 8px;
	border-bottom: 1px solid var(--eum-line);
	justify-content: flex-start;
}

.eum-member-tabs {
	gap: 4px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--eum-line);
	flex-wrap: nowrap;
	overflow-x: auto;
}

.eum-member-tabs .nav-link {
	padding: 6px 14px;
	border-radius: 16px;
	font-size: 14px;
	color: var(--eum-text-sub);
	white-space: nowrap;
}

.eum-info-list .eum-info-row {
	display: flex;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--eum-line);
	font-size: 14px;
}

.eum-info-list dt {
	flex: 0 0 84px;
	font-weight: 400;
	color: var(--eum-text-sub);
}

.eum-info-list dd {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: var(--eum-text-title);
	word-break: break-all;
}

.eum-memo-content {
	font-size: 14px;
	color: var(--eum-text-title);
	white-space: pre-wrap;
	word-break: break-word;
}

/* 최근 12주 출석 격자 */
.eum-week-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 4px;
}

.eum-week-cell {
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	background: #e5e7eb;
}

.eum-week-cell.is-on {
	background: var(--eum-brand);
}

/* ── 출석 ─────────────────────────────────────────── */

.eum-att-card {
	display: block;
	height: 100%;
	padding: 10px;
	border: 1px solid transparent;
	border-radius: var(--eum-tile-radius);
	background: var(--eum-card-bg);
	box-shadow: var(--eum-card-shadow);
	font: inherit;
	color: inherit;
	transition: background-color 0.15s, border-color 0.15s;
}

.eum-att-card.is-checked {
	border-color: var(--eum-brand);
	background: #f1f5ff;
}

.eum-att-check.bi {
	flex: 0 0 auto;
	font-size: 22px;
	color: #d1d5db;
}

.eum-att-card.is-checked .eum-att-check.bi {
	color: var(--eum-brand);
}

.eum-att-stamps {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 6px;
}

.eum-att-stamp {
	--eum-type-color: var(--eum-brand);
	padding: 0 6px;
	border-radius: 9px;
	font-size: 11px;
	line-height: 18px;
	color: #fff;
	background: var(--eum-type-color);
}

.eum-att-stamps:empty {
	display: none;
}

/* ── 양육 ─────────────────────────────────────────── */

button.eum-edu-card {
	display: block;
	font: inherit;
	color: inherit;
}

button.eum-edu-card .bi {
	flex: 0 0 auto;
}

/* ── 결연 ─────────────────────────────────────────── */

.eum-mobile-list .list-group-item.is-selected {
	background: #f1f5ff;
}

/* ── 신우: 전출 ────────────────────────────────────── */

.eum-min-h-0 {
	min-height: 0;
}

/* 전출 창은 화면(교회 지정 · 고르기 · 확인)마다 목록만 스크롤하고 위아래 버튼 줄은 고정한다 */
body.eum-mobile #eumMobileTransferOffcanvas .offcanvas-body {
	overflow: hidden;
}

/* 목록 안 카테고리 구분자 - 신우 목록에서 카테고리가 바뀌는 자리 */
.eum-list-divider {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #f8fafc;
	border-top: 1px solid var(--eum-line);
	border-bottom: 1px solid var(--eum-line);
	font-size: 12px;
	font-weight: 700;
	color: var(--eum-text-sub);
}

.eum-list-divider:first-child {
	border-top: 0;
}

.eum-list-divider .bi {
	color: var(--eum-text-muted);
}

.eum-list-divider-count {
	margin-left: auto;
	flex: 0 0 auto;
	font-weight: 600;
	color: var(--eum-text-muted);
}

/* 구분자 바로 다음 행은 위 테두리를 겹쳐 그리지 않는다 */
.eum-list-divider + .list-group-item {
	border-top: 0;
}

/* ── 신우: 보기 방식(그리드 · 카드 · 타일). 리스트는 위 list-group 그대로 ── */

/* 카드·타일은 바깥 흰 카드를 걷고 배경 위에 카드를 깐다 */
.eum-card.eum-members-frame-bare {
	background: transparent;
	box-shadow: none;
	border: 0;
	overflow: visible !important;
}

/* 그리드 - 표만 가로로 밀린다(화면은 넘치지 않는다). 이름 열은 왼쪽에 붙어 있다 */
.eum-members-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.eum-members-table {
	width: 100%;
	min-width: 560px;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 13px;
}

.eum-members-table th,
.eum-members-table td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--eum-line);
	white-space: nowrap;
	vertical-align: middle;
	background: var(--eum-card-bg);
}

.eum-members-table th {
	font-size: 12px;
	font-weight: 700;
	color: var(--eum-text-sub);
	background: #f8fafc;
}

.eum-members-table .eum-members-col-name {
	position: sticky;
	left: 0;
	z-index: 1;
	max-width: 150px;
	box-shadow: 1px 0 0 var(--eum-line);
}

/* 체크 칸은 맨 오른쪽 - 가로로 밀어도 늘 보인다 */
.eum-members-table .eum-members-col-check {
	position: sticky;
	right: 0;
	z-index: 1;
	width: 44px;
	padding: 0 4px;
	text-align: center;
	box-shadow: -1px 0 0 var(--eum-line);
}

.eum-members-table .eum-row-check {
	margin: 0;
}

.eum-members-table .wm-avatar {
	width: 28px;
	height: 28px;
	flex-basis: 28px;
	font-size: 12px;
}

.eum-members-table tbody tr.is-selected td {
	background: #f1f5ff;
}

.eum-members-table-divider td {
	padding: 0;
	background: #f8fafc;
}

.eum-members-table-divider .eum-list-divider {
	position: sticky;
	left: 0;
	display: inline-flex;
	width: min(100vw - 2 * var(--eum-gutter), var(--eum-max-width));
	border: 0;
}

/* 카드(fixed) - 같은 높이 3열 / 타일(card) - 내용만큼 높이가 다른 3열(CSS columns) */
.eum-members-layout-fixed {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.eum-members-layout-card {
	columns: 3;
	column-gap: 8px;
}

.eum-members-layout-card > .eum-member-card {
	break-inside: avoid;
	margin-bottom: 8px;
}

/* 묶음 구분자는 한 줄 전체를 차지한다 */
.eum-members-layout-fixed > .eum-list-divider {
	grid-column: 1 / -1;
}

.eum-members-layout-card > .eum-list-divider {
	column-span: all;
	margin-bottom: 8px;
}

.eum-members-layout-fixed > .eum-list-divider,
.eum-members-layout-card > .eum-list-divider {
	border: 0;
	border-radius: var(--eum-tile-radius);
	background: var(--eum-card-bg);
	box-shadow: var(--eum-card-shadow);
}

.eum-member-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--eum-card-bg);
	border: 1px solid transparent;
	border-radius: var(--eum-tile-radius);
	box-shadow: var(--eum-card-shadow);
	overflow: hidden;
	cursor: pointer;
}

.eum-member-card.is-selected {
	border-color: var(--eum-accent);
	background: #f1f5ff;
}

.eum-member-card-avatar {
	display: flex;
	justify-content: center;
	padding-top: 14px;
}

.eum-member-tile-photo {
	display: block;
	width: 100%;
	height: auto;
}

.eum-member-card-body {
	padding: 6px 6px 8px;
	text-align: center;
	min-width: 0;
}

/* 한 줄 3개라 칸이 좁다 - 둘째 줄부터는 조금 작게(휴대폰 번호가 한 줄에 들어가게) */
.eum-member-card-body .small {
	font-size: 11px;
}

.eum-members-layout-card .eum-member-card-body {
	text-align: left;
}

.eum-member-card-name {
	display: flex;
	flex-wrap: wrap; /* 새신우 표시는 자리가 모자라면 이름 아래 줄로 */
	align-items: center;
	justify-content: center;
	gap: 2px 4px;
	font-weight: 700;
	min-width: 0;
}

.eum-members-layout-card .eum-member-card-name {
	justify-content: flex-start;
}

.eum-member-card-name .badge {
	font-size: 10px;
}

/* 카드·타일은 오른쪽 위에 체크 */
.eum-member-card .eum-row-check {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
	margin: 0;
}

/* offcanvas 하단 버튼 줄(취소·저장 등) - 본문만 스크롤하고 이 줄은 늘 아래에 붙어 있다.
   버튼은 일반 크기(btn-sm 없음 - CLAUDE.md §5 푸터 버튼 크기 규칙) */
body.eum-mobile .offcanvas-footer {
	flex-shrink: 0;
	background: #fff;
	padding-bottom: var(--eum-safe-bottom);
}

body.eum-mobile .offcanvas .offcanvas-body {
	min-height: 0;
}

/* 아래에서 올라오는 시트는 시트 자체가 안전 여백을 두므로 footer 에서 한 번 더 두지 않는다 */
body.eum-mobile .wm-sheet .offcanvas-footer {
	padding-bottom: 0;
}

/* ── 로그인(/eum_mobile/login) ───────────────────────
   셸이 없는 단독 페이지다(로그인 전에는 조직이 정해지지 않아 상단바·하단 탭을 그릴 수 없다). */
body.eum-mobile-login {
	min-height: 100svh;
}

body.eum-mobile .eum-login {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100svh;
	padding: 32px var(--eum-gutter) calc(32px + var(--eum-safe-bottom));
}

body.eum-mobile .eum-login-inner {
	width: 100%;
	max-width: 420px;
}

body.eum-mobile .eum-login-logo {
	width: auto;
	height: 60px; /* 원본 300×103 을 절반 조금 넘게 - 레티나에서도 선명하다 */
	object-fit: contain;
}

body.eum-mobile .eum-login-lead {
	font-size: 13px;
	color: var(--eum-text-sub);
}

body.eum-mobile .eum-login-title {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 800;
	color: var(--eum-text-title);
}

body.eum-mobile .eum-login-sub {
	margin: 0 0 20px;
	font-size: 13px;
	color: var(--eum-text-sub);
}

body.eum-mobile .eum-login-note {
	margin: 16px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: var(--eum-text-muted);
}

/* 현황 - 목양 알림 3번 아래 '전역일 미입력 N명' 링크 */
/* ── 출석설정(더보기) ─────────────────────────────── */

/* 출석 구분 표식 - 별칭 글자를 구분 색(att_type_color) 원 안에 */
.eum-atts-mark {
	--eum-type-color: var(--eum-brand);
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--eum-type-color);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	overflow: hidden;
	white-space: nowrap;
}

/* ▲▼ 순서 버튼 - 손가락으로 누르기 쉬운 크기 */
.eum-atts-move {
	width: 40px;
	height: 40px;
	padding: 0;
}

/* 선택지 포인트 칸 */
.eum-atts-option-point {
	flex: 0 0 76px;
	width: 76px;
}

/* ── 신우 이음 설정(더보기) ─────────────────────────── */

/* 하단 저장 바(wani-m-action-bar)가 목록 끝을 가리지 않게 */
.eum-nb-page {
	padding-bottom: 64px;
}

.eum-nb-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: #f1f5f9;
	color: var(--eum-text-sub);
	font-size: 16px;
}

/* ▲▼ 순서 버튼 */
.eum-nb-order .btn {
	width: 28px;
	height: 22px;
	line-height: 1;
}

/* ── 조직설정(더보기) ─────────────────────────────── */
.eum-orgset-invite {
	padding: 14px 12px;
	border-radius: var(--eum-tile-radius);
	background: #f3f4f6;
	text-align: center;
}

.eum-orgset-invite-code {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 0.3em;
	color: var(--eum-text-title);
	font-variant-numeric: tabular-nums;
	user-select: all;
}

.eum-orgset-thumb {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--eum-line);
}

.eum-orgset-dropzone.dropzone {
	min-height: 96px;
	padding: 12px;
}

.eum-orgset-postcode {
	min-height: 420px;
}

/* 신우 수정 - 주소 검색(카카오 우편번호) 전체 덮개. 상세 offcanvas 안에서 본문을 가린다 */
.eum-address-search {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	background: #fff;
}

.eum-address-search-head {
	display: flex;
	align-items: center;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--bs-border-color);
}

.eum-address-search-host {
	flex: 1 1 auto;
	min-height: 0;
}

[data-eum-address-open] {
	cursor: pointer;
}

/* ── 버튼: 아이콘과 글자 사이 간격 ───────────────────────
 * 아이콘 뒤에 공백 없이 쓴 버튼(<i class="bi …"></i>저장)도 띄워지게 PC(custom.css .btn)처럼 flex + gap 으로 맞춘다.
 * 줄 안의 버튼 흐름은 그대로 두려고 flex 가 아니라 inline-flex. 아이콘의 me-* 는 gap 과 겹치므로 지운다.
 */
body.eum-mobile .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}
body.eum-mobile .btn > .bi[class*="me-"] {
	margin-right: 0 !important;
}
/* 왼쪽 정렬 버튼(목록형 선택 버튼 등)은 왼쪽에 붙이고, 말줄임 버튼은 flex 에서 말줄임이 안 되므로 블록 흐름을 유지한다 */
body.eum-mobile .btn.text-start {
	justify-content: flex-start;
}
body.eum-mobile .btn.text-truncate {
	display: inline-block;
}

/* ── 채팅(eum_mobile/chat.js) - 대화창은 신우 상세와 같은 전체화면 offcanvas ── */

/* 검색창 ↔ 칩 ↔ 목록 여백을 같게(12px) - 칩 아래는 줄 안쪽 4px + 바깥 8px */
.eum-chat-toolbar {
	padding-bottom: 4px;
}

.eum-chat-toolbar [data-eum-chat-filter] {
	margin-top: 12px;
}

.eum-chat-offcanvas .offcanvas-body {
	min-height: 0;
	background: var(--eum-bg);
}

/* 실시간 연결 점 - 붙으면 초록 */
.eum-chat-conn {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--eum-text-muted);
}

.eum-chat-conn.is-on {
	background: #16a34a;
}

.eum-chat-messages {
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 8px 12px 12px;
}

.eum-chat-day {
	display: flex;
	justify-content: center;
	margin: 14px 0 6px;
}

.eum-chat-day span {
	padding: 3px 12px;
	border-radius: 999px;
	background: rgba(var(--eum-brand-rgb), 0.06);
	color: var(--eum-text-sub);
	font-size: 12px;
}

.eum-chat-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 4px;
}

.eum-chat-row.is-first {
	margin-top: 12px;
}

.eum-chat-row.is-mine {
	justify-content: flex-end;
}

.eum-chat-avatar {
	flex: none;
	width: 36px;
}

.eum-chat-avatar .wm-avatar {
	width: 36px;
	height: 36px;
	font-size: 14px;
}

.eum-chat-stack {
	display: flex;
	flex-direction: column;
	min-width: 0;
	max-width: 78%;
}

.eum-chat-row.is-mine .eum-chat-stack {
	align-items: flex-end;
}

.eum-chat-name {
	margin: 0 0 3px 2px;
	font-size: 12px;
	font-weight: 600;
	color: var(--eum-text);
}

/* 글 상자 + 시각(내 글은 시각이 왼쪽) */
.eum-chat-line {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	min-width: 0;
}

.eum-chat-row.is-mine .eum-chat-line {
	flex-direction: row-reverse;
}

.eum-chat-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	cursor: pointer;
}

.eum-chat-row.is-mine .eum-chat-content {
	align-items: flex-end;
}

.eum-chat-bubble {
	display: inline-block;
	max-width: 100%;
	padding: 9px 13px;
	border-radius: 4px 16px 16px 16px;
	background: var(--eum-card-bg);
	box-shadow: var(--eum-card-shadow);
	color: var(--eum-text-title);
	font-size: 15px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.eum-chat-row.is-mine .eum-chat-bubble {
	border-radius: 16px 4px 16px 16px;
	background: var(--eum-brand);
	color: #fff;
}

.eum-chat-row.is-deleted .eum-chat-bubble {
	background: transparent;
	box-shadow: none;
	border: 1px dashed var(--eum-text-muted);
	color: var(--eum-text-muted);
	font-style: italic;
}

.eum-chat-time {
	flex: none;
	font-size: 11px;
	line-height: 1.3;
	color: var(--eum-text-muted);
	white-space: nowrap;
}

.eum-chat-row.is-mine .eum-chat-time {
	text-align: right;
}

/* 답장 인용 */
.eum-chat-quote {
	display: block;
	max-width: 100%;
	padding: 6px 10px;
	border-left: 3px solid rgba(var(--eum-brand-rgb), 0.35);
	border-radius: 8px;
	background: rgba(var(--eum-brand-rgb), 0.05);
	color: var(--eum-text-sub);
	font-size: 12px;
}

.eum-chat-attachments {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 100%;
}

.eum-chat-image img {
	display: block;
	max-width: min(240px, 100%);
	max-height: 240px;
	border-radius: 12px;
	object-fit: cover;
	background: var(--eum-card-bg);
}

.eum-chat-file {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 240px;
	padding: 8px 12px;
	border-radius: 12px;
	background: var(--eum-card-bg);
	box-shadow: var(--eum-card-shadow);
	color: var(--eum-text-title);
	font-size: 13px;
	text-decoration: none;
}

.eum-chat-file .bi {
	font-size: 22px;
	color: var(--eum-brand);
}

/* 입력 */
.eum-chat-compose {
	flex: none;
	background: var(--eum-card-bg);
	border-top: 1px solid var(--eum-line);
	padding: 8px 10px;
}

.eum-chat-context {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	padding: 8px 10px;
	border-radius: 12px;
	background: var(--eum-blue-bg);
	color: var(--eum-blue);
}

.eum-chat-files {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.eum-chat-file-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	padding: 4px 6px 4px 10px;
	border-radius: 999px;
	background: var(--eum-bg);
	font-size: 12px;
}

.eum-chat-file-chip .btn-close {
	width: 0.6em;
	height: 0.6em;
}

.eum-chat-form {
	display: flex;
	align-items: flex-end;
	gap: 6px;
}

.eum-chat-input {
	flex: 1 1 auto;
	min-height: 40px;
	max-height: 132px;
	padding: 9px 14px;
	border-radius: 20px;
	background: var(--eum-bg);
	border-color: transparent;
	font-size: 15px;
	line-height: 1.4;
	resize: none;
}

.eum-chat-input:focus {
	background: var(--eum-card-bg);
	border-color: rgba(var(--eum-brand-rgb), 0.35);
	box-shadow: none;
}

.eum-chat-icon-btn,
.eum-chat-send {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	font-size: 18px;
}

.eum-chat-icon-btn {
	color: var(--eum-text-sub);
}

.eum-chat-send {
	background: var(--eum-brand);
	color: #fff;
}

.eum-chat-send:hover,
.eum-chat-send:focus,
.eum-chat-send:disabled {
	background: var(--eum-brand);
	color: #fff;
}

/* 창 스크롤은 본문 하나만(2026-11-27, 관리 화면 custom.css 와 같은 규칙 - 이 화면은 custom.css 를 싣지 않는다) */
.modal-dialog:not([class*="modal-fullscreen"]) > .modal-content{max-height: calc(100dvh - var(--bs-modal-margin) * 2)}
.modal-dialog:not([class*="modal-fullscreen"]) > .modal-content > .modal-body,
.modal-dialog:not([class*="modal-fullscreen"]) > .modal-content > form > .modal-body{overflow-y: auto; min-height: 0}
.modal-dialog:not([class*="modal-fullscreen"]) > .modal-content > form{display: flex; flex-direction: column; min-height: 0}
