.m-loan-page {
  --ml-yellow: #ff642e;
  --ml-ink: #1c1914;
  --ml-title: #2a2418;
  --ml-body: #5c5346;
  --ml-soft: #8a8070;
  --ml-mute: #b0a696;
  --ml-up: #0a8f5a;
  --ml-accent: #c47a00;
  position: relative;
  min-height: 100vh;
  color: var(--ml-body);
  background: #f7f5ef url("/m/assets/loan-bg.jpg?v=20261101l") center top / cover no-repeat;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px);
  font-size: 15px;
}
.m-loan-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 210, 190, 0.5) 0%, rgba(247, 245, 239, 0.84) 45%, rgba(247, 245, 239, 0.95) 100%);
}
.m-loan-page > *:not(.m-tabbar):not(.ml-sheet-mask) {
  position: relative;
  z-index: 1;
}
.m-loan-page .m-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
}

.ml-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  padding-top: calc(12px + var(--safe-t, 0px));
  background: rgba(255, 228, 17, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ml-back {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #f3f3f3);
  color: var(--ml-ink);
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.ml-top h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  color: var(--ml-ink);
}
.ml-link {
  font-size: 15px;
  font-weight: 800;
  color: var(--ml-ink);
  text-decoration: none;
  min-width: 40px;
  text-align: right;
}

.ml-main {
  padding: 16px 14px 24px;
  display: grid;
  gap: 14px;
}

.ml-card {
  background: linear-gradient(180deg, #ffffff, #fffaf0);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.08),
    0 2px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(0, 0, 0, 0.04) inset;
  border: 1px solid rgba(255, 255, 255, 0.85);
}
.ml-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
  color: var(--ml-title);
}

.ml-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ml-info-tile {
  padding: 14px 12px;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffe0d4 0%, #ffe98a 55%, #ff642e 100%);
  box-shadow:
    0 8px 16px rgba(240, 180, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.ml-info-tile em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--ml-soft);
  margin-bottom: 8px;
  font-weight: 600;
}
.ml-info-tile strong {
  font-size: 28px;
  font-weight: 900;
  color: var(--ml-ink);
  line-height: 1.1;
}
.ml-info-tile span {
  font-size: 13px;
  color: var(--ml-soft);
  margin-left: 3px;
  font-weight: 700;
}
.ml-next {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ml-soft);
  line-height: 1.55;
  font-weight: 500;
}

.ml-apply-btn,
.ml-submit,
.ml-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border: 0;
  margin-top: 16px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #ff8a5c 0%, #ff642e 45%, #e84e1a 100%);
  color: var(--ml-ink);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow:
    0 10px 20px rgba(232, 78, 26, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(200, 60, 20, 0.18);
  cursor: pointer;
}
.ml-apply-btn:disabled,
.ml-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.ml-tiers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ml-tiers li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f7f4ec);
  font-size: 15px;
  color: var(--ml-body);
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04), inset 0 1px 0 #fff;
  border: 1px solid #efe6d2;
}
.ml-tiers li.is-on {
  background: linear-gradient(160deg, #ffe0d4, #ff642e);
  color: var(--ml-ink);
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(240, 180, 0, 0.2);
}
.ml-tiers li.is-locked {
  opacity: 0.68;
}
.ml-tiers b {
  color: var(--ml-accent);
  font-weight: 900;
  font-size: 16px;
}
.ml-tiers li.is-on b {
  color: var(--ml-ink);
}

.ml-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 25, 20, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ml-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 84vh;
  overflow: auto;
  background: linear-gradient(180deg, #fffdf8, #fff);
  border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
}
.ml-sheet-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ml-sheet-hd strong {
  font-size: 18px;
  font-weight: 900;
  color: var(--ml-title);
}
.ml-sheet-hd button {
  border: 0;
  background: #f3f1ea;
  color: var(--ml-ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.ml-sheet-tip {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ml-soft);
  line-height: 1.5;
}

.ml-form label {
  display: block;
  margin-bottom: 14px;
}
.ml-form label > span {
  display: block;
  font-size: 14px;
  color: var(--ml-soft);
  margin-bottom: 8px;
  font-weight: 700;
}
.ml-input-wrap {
  position: relative;
}
.ml-input-wrap i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  color: var(--ml-mute);
  font-size: 14px;
  font-weight: 700;
}
.ml-form input,
.ml-form select,
.ml-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ebe3d0;
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 16px;
  background: linear-gradient(180deg, #fff, #faf7f0);
  color: var(--ml-ink);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.ml-input-wrap input {
  padding-right: 40px;
}
.ml-form input:focus,
.ml-form select:focus,
.ml-form textarea:focus {
  border-color: #e84e1a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 228, 17, 0.28);
}
.ml-submit {
  margin-top: 6px;
}
.ml-msg {
  margin: 12px 0 0;
  font-size: 14px;
  color: #d9483b;
  text-align: center;
  min-height: 1.2em;
  font-weight: 700;
}
.ml-msg.ok { color: var(--ml-up); }

.ml-guest {
  margin: 14px 0 0;
  text-align: center;
  color: var(--ml-soft);
  font-size: 15px;
  line-height: 1.5;
}
.ml-login-btn {
  margin-top: 12px;
}

.ml-list {
  display: grid;
  gap: 12px;
  padding: 0;
}
.ml-rec {
  background: linear-gradient(180deg, #ffffff, #fffaf0);
  border-radius: 18px;
  padding: 16px 14px;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
}
.ml-rec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ml-rec-hd strong {
  font-size: 24px;
  font-weight: 900;
  color: var(--ml-ink);
}
.ml-rec-hd strong small {
  font-size: 13px;
  font-weight: 700;
  color: var(--ml-soft);
  margin-left: 3px;
}
.ml-badge {
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff4e5;
  color: #e67e00;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.ml-badge.approved { background: #e8f8ef; color: var(--ml-up); }
.ml-badge.rejected { background: #fff1f0; color: #d9483b; }
.ml-badge.repaid { background: #e8f1ff; color: #2f6fed; }
.ml-badge.cancelled { background: #f3f1ea; color: var(--ml-mute); }
.ml-rec-meta {
  font-size: 14px;
  color: var(--ml-soft);
  line-height: 1.65;
  font-weight: 500;
}
.ml-empty {
  text-align: center;
  color: var(--ml-mute);
  font-size: 15px;
  padding: 56px 14px;
  line-height: 1.6;
  background: linear-gradient(180deg, #fff, #fffaf0);
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
}
.ml-empty a {
  color: var(--ml-accent);
  font-weight: 800;
  text-decoration: none;
}
