/* mobile.css — 경로당 어르신 폰 화면 (큰 글씨·큰 버튼 하나부터 열까지) */
body.mobile {
  font-size: 20px;
  background: var(--ivory);
  min-height: 100dvh;
  -webkit-user-select: none;
  user-select: none;
}

.m-wrap {
  max-width: 520px;
  margin: 0 auto;
  height: 100dvh;
  overflow: hidden;
  background: var(--ivory);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ---------------------------------------------------------------- 인증 */
.auth {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px 22px 30px;
  overflow-y: auto;
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; color: var(--green-700); letter-spacing: -0.02em;
}
.auth-brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--green-700);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.auth-step { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 40px; }
.auth-step h1 { font-size: 34px; line-height: 1.32; margin-bottom: 12px; color: var(--ink); }
.auth-step .hint { font-size: 19px; color: var(--muted); margin: 0 0 26px; line-height: 1.5; }

.big-input {
  width: 100%;
  padding: 18px 20px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  outline: none;
}
.big-input:focus { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(42, 122, 88, .14); }
.big-input.code { text-align: center; letter-spacing: 0.4em; font-size: 34px; }

.auth-btn {
  margin-top: 18px;
  width: 100%;
  height: 74px;
  border-radius: 16px;
  background: var(--green-700);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}
.auth-btn:active { background: var(--green-800); }

.auth-msg { margin-top: 14px; font-size: 17px; color: var(--red); min-height: 24px; }
.auth-msg.ok { color: var(--green-600); }

.demo-box {
  margin-top: 26px;
  background: #fff;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  padding: 14px 16px;
}
.demo-box b { display: block; font-size: 15px; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.demo-chip {
  display: block; width: 100%; text-align: left;
  padding: 12px 14px; margin-bottom: 8px;
  background: var(--mint-soft); border-radius: 10px;
  font-size: 16px; font-weight: 700; color: var(--green-800);
}
.demo-chip:last-child { margin-bottom: 0; }
.demo-chip span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.pick-search {
  width: 100%; padding: 16px 18px; font-size: 20px;
  border: 2px solid var(--line-strong); border-radius: 14px; background: #fff; outline: none;
}
.pick-list { margin-top: 14px; overflow: auto; flex: 1; }
.pick-item {
  display: block; width: 100%; text-align: left;
  padding: 18px 16px; margin-bottom: 10px;
  background: #fff; border: 2px solid var(--line); border-radius: 14px;
}
.pick-item:active { border-color: var(--green-500); }
.pick-item b { font-size: 22px; display: block; }
.pick-item span { font-size: 15px; color: var(--muted); }

/* ---------------------------------------------------------------- 홈 */
.home { flex: 1; display: flex; flex-direction: column; padding: 18px 18px 8px; overflow-y: auto; min-height: 0; }
.home-head {
  background: var(--green-800);
  color: #fff;
  border-radius: 20px;
  padding: 20px 22px 22px;
  position: relative;
  overflow: hidden;
}
.home-head::after {
  content: ""; position: absolute; right: -40px; top: -50px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(194, 217, 203, .12);
}
.home-head .branch { font-size: 15px; color: var(--mint); font-weight: 700; }
.home-head .hall { font-size: 29px; font-weight: 800; margin-top: 6px; line-height: 1.25; }
.home-head .who { font-size: 17px; color: #dbe8e0; margin-top: 6px; }

.big-buttons { flex: 1; display: flex; flex-direction: column; gap: 12px; margin-top: 14px; min-height: 0; }
.big-btn {
  position: relative;
  flex: 1 1 0;
  min-height: 100px;
  border-radius: 20px;
  display: flex; align-items: center; gap: 18px;
  padding: 20px 22px;
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12), 0 10px 22px rgba(15, 40, 28, .12);
  text-align: left;
}
.big-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.big-btn .ico { font-size: 46px; line-height: 1; }
.big-btn .label { font-size: 29px; font-weight: 800; line-height: 1.22; letter-spacing: -0.02em; }
.big-btn.news { background: linear-gradient(140deg, #1e5e45, #174b38); }
.big-btn.photo { background: linear-gradient(140deg, #b45309, #92400e); }
.big-btn.info { background: linear-gradient(140deg, #26456b, #1b3252); }
.big-btn .badge {
  position: absolute; top: 14px; right: 14px;
  background: #fde2e0; color: #9b1c14;
  font-size: 16px; font-weight: 800;
  padding: 5px 12px; border-radius: 999px;
}
.big-btn .badge.hidden { display: none; }

.mall-link {
  margin: 8px auto 0; display: block;
  font-size: 13px; color: #9aa8a0; text-decoration: underline; padding: 4px 10px;
}
.m-home-foot { text-align: center; font-size: 12.5px; color: #a9b5ae; padding-bottom: 2px; }

/* ---------------------------------------------------------------- 패널 */
.panel {
  position: fixed; inset: 0; z-index: 300;
  background: var(--ivory);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: panelIn .18s ease-out;
}
@keyframes panelIn { from { transform: translateY(14px); opacity: .4; } to { transform: none; opacity: 1; } }

.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
}
.back-btn {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 26px;
  background: #eef3f0; color: var(--green-800); flex: none;
}
.panel-head h2 { font-size: 23px; }
.panel-body { flex: 1; overflow: auto; padding: 18px; min-height: 0; }

/* 소식 목록 */
.notice-card {
  display: block; width: 100%; text-align: left;
  background: #fff; border: 2px solid var(--line); border-radius: 16px;
  padding: 18px 18px 16px; margin-bottom: 13px;
}
.notice-card.unread { border-color: var(--green-500); background: #fbfdfb; }
.notice-card .t { font-size: 21px; font-weight: 800; line-height: 1.4; }
.notice-card .m { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.notice-card .chip { font-size: 13.5px; }

/* 소식 읽기 */
.reader { flex: 1; display: flex; flex-direction: column; background: #fff; min-height: 0; }
.reader-body { flex: 1; overflow: auto; padding: 24px 22px 20px; min-height: 0; }
.reader-body h1 { font-size: 29px; line-height: 1.38; margin-bottom: 10px; }
.reader-meta { font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.reader-text { font-size: 26px; line-height: 1.86; color: #101a15; letter-spacing: -0.01em; }
.reader-text p { margin: 0 0 18px; }
.reader-text p.speaking { background: #fff4d6; border-radius: 8px; box-shadow: 0 0 0 6px #fff4d6; }
.reader-foot {
  border-top: 1px solid var(--line); background: #fff;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px;
}
.progress { height: 8px; background: var(--mint-soft); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--green-500); transition: width .25s; }
.reader-actions { display: flex; gap: 10px; }
.reader-actions .btn { flex: 1; height: 68px; font-size: 22px; border-radius: 14px; }
.btn-listen { background: #eef3f0; border: 2px solid var(--line-strong); color: var(--green-800); font-weight: 800; }
.btn-confirm { background: var(--green-700); color: #fff; font-weight: 800; flex: 1.4 !important; }
.btn-confirm:disabled { background: #cfdcd5; color: #7d8b84; }
.reader-done { padding: 60px 24px; text-align: center; }
.reader-done .big { font-size: 62px; }
.reader-done h2 { font-size: 28px; margin: 14px 0 8px; }
.reader-done p { font-size: 18px; color: var(--muted); line-height: 1.6; }

/* 사진 */
.shoot-grid { display: grid; gap: 14px; margin-top: 6px; }
.shoot-btn {
  display: flex; align-items: center; gap: 16px;
  width: 100%; min-height: 128px; padding: 20px 22px;
  border-radius: 18px; background: #fff; border: 2px solid var(--line-strong);
  text-align: left;
}
.shoot-btn:active { border-color: var(--green-500); background: #fbfdfb; }
.shoot-btn .ico { font-size: 44px; }
.shoot-btn b { display: block; font-size: 25px; line-height: 1.3; }
.shoot-btn span { font-size: 15px; color: var(--muted); }
.shoot-help {
  margin-top: 22px; padding: 18px; border-radius: 14px; background: #fff;
  font-size: 17px; line-height: 1.7; color: var(--ink-soft); border: 1px solid var(--line);
}
.shoot-help b { color: var(--green-700); }

.photo-preview { background: #fff; border-radius: 18px; overflow: hidden; border: 2px solid var(--line); }
.photo-preview img { display: block; width: 100%; max-height: 46vh; object-fit: contain; background: #eef1ee; }
.photo-preview .cap { padding: 12px 16px; font-size: 15px; color: var(--muted); }
.photo-memo {
  width: 100%; margin-top: 14px; padding: 16px; font-size: 20px;
  border: 2px solid var(--line-strong); border-radius: 14px; min-height: 80px;
  outline: none; resize: vertical;
}
.photo-memo:focus { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(42, 122, 88, .12); }
.send-btn {
  margin-top: 16px; width: 100%; height: 76px; border-radius: 16px;
  background: var(--green-700); color: #fff; font-size: 26px; font-weight: 800;
}
.send-btn.alt { background: #eef3f0; color: var(--green-800); font-size: 20px; height: 58px; border: 2px solid var(--line-strong); }

/* 우리 경로당 */
.info-card { background: #fff; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 16px; overflow: hidden; }
.info-card > h3 {
  font-size: 17px; padding: 14px 18px; background: #f2f6f3; color: var(--green-800);
  border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center;
}
.info-card > h3 span { font-size: 14px; font-weight: 600; color: var(--muted); }
.item-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; border-bottom: 1px solid #f0f4f1;
}
.item-row:last-child { border-bottom: none; }
.item-row .emoji { font-size: 28px; width: 34px; text-align: center; }
.item-row .nm { flex: 1; font-size: 20px; font-weight: 700; }
.item-row .qty { font-size: 16px; color: var(--muted); }
.item-row .state { font-size: 13px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.state-정상 { background: var(--mint-soft); color: var(--green-700); }
.state-부족 { background: var(--red-soft); color: var(--red); }
.state-점검필요 { background: var(--amber-soft); color: var(--amber); }
.state-점검\ 필요 { background: var(--amber-soft); color: var(--amber); }
.state-소비품 { background: #eef3f0; color: var(--muted); }

.kv { display: flex; padding: 13px 18px; border-bottom: 1px solid #f0f4f1; font-size: 18px; gap: 14px; }
.kv:last-child { border-bottom: none; }
.kv b { width: 112px; color: var(--muted); font-weight: 700; flex: none; font-size: 17px; word-break: keep-all; }
.kv span { flex: 1; }
.kv a { font-weight: 700; }

.mlist-row { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid #f0f4f1; font-size: 18px; }
.mlist-row:last-child { border-bottom: none; }
.mlist-row .tt { flex: 1; font-weight: 700; line-height: 1.4; }
.mlist-row .dd { font-size: 14px; color: var(--muted); }

@media (min-height: 780px) {
  .big-btn { min-height: 120px; }
  .big-btn .label { font-size: 31px; }
  .big-btn .ico { font-size: 50px; }
}
@media (max-width: 360px) {
  .big-btn .label { font-size: 26px; }
  .home-head .hall { font-size: 25px; }
  .auth-step h1 { font-size: 30px; }
}
