:root {
  --mg-bg: #0c2228;
  --mg-bg-soft: #123038;
  --mg-surface: rgba(255, 255, 255, 0.06);
  --mg-surface-strong: rgba(255, 255, 255, 0.1);
  --mg-text: #f3f7f8;
  --mg-muted: #a8bec6;
  --mg-accent: #d7b56d;
  --mg-accent-2: #48dfc0;
  --mg-teal: #28b8af;
  --mg-teal-deep: #129088;
  --mg-brand-rgb: 40, 184, 175;
  --mg-bg-rgb: 12, 34, 40;
  --mg-danger: #ff7b7b;
  --mg-success: #67e0a3;
  --mg-radius: 18px;
  --mg-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  /* 全站模块统一内容宽（首页 / 客服等共用 .mg-shell） */
  --mg-max: 1400px;
  /* 登入註冊等表单页可用的较窄阅读宽 */
  --mg-form-max: 560px;
  --mg-tabbar-h: 68px;
  --mg-gutter: 18px;
  --mg-font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --mg-display: "Outfit", "Noto Sans TC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.moneygo-body {
  margin: 0;
  font-family: var(--mg-font);
  color: var(--mg-text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(var(--mg-brand-rgb), 0.32), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(215, 181, 109, 0.18), transparent 45%),
    linear-gradient(180deg, #0c2228 0%, #0f2a30 45%, #0a2018 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.mg-app {
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--mg-tabbar-h) + 18px);
  position: relative;
}

/* 全局模块容器：所有页面主内容区统一用这个宽度 */
.mg-shell {
  width: min(100%, var(--mg-max));
  margin: 0 auto;
  padding-left: var(--mg-gutter);
  padding-right: var(--mg-gutter);
}

.mg-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  backdrop-filter: blur(14px);
  background: rgba(var(--mg-bg-rgb), 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.mg-desktop-nav {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 8px;
}

.mg-desktop-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--mg-muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.mg-desktop-link:hover,
.mg-desktop-link.is-active {
  color: #f0d48a;
  background: rgba(215, 181, 109, 0.12);
}

.mg-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mg-btn-top {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.86rem;
}

.mg-btn-top.mg-btn-primary {
  display: none;
}

.mg-brand {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.mg-brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(220px, 52vw);
  object-fit: contain;
  object-position: left center;
}

.mg-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--mg-display);
  font-weight: 800;
  color: #102226;
  background: linear-gradient(135deg, #f0d48a, #c9a24a);
  box-shadow: 0 8px 20px rgba(201, 162, 74, 0.35);
}

.mg-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.mg-brand-text strong {
  font-family: var(--mg-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.mg-brand-text small {
  color: var(--mg-muted);
  font-size: 0.72rem;
}

.mg-link-quiet {
  color: var(--mg-muted);
  font-size: 0.9rem;
}

.mg-main {
  padding: 0 0 8px;
}

.mg-flash {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  animation: mg-fade-up 0.45s ease both;
}

.mg-flash-success {
  background: rgba(103, 224, 163, 0.15);
  border: 1px solid rgba(103, 224, 163, 0.35);
  color: #baf5d4;
}

.mg-flash-error {
  background: rgba(255, 123, 123, 0.14);
  border: 1px solid rgba(255, 123, 123, 0.35);
  color: #ffd0d0;
}

.mg-hero {
  position: relative;
  width: 100%;
  padding: 28px 0 12px;
}

.mg-hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--mg-shadow);
  min-height: min(64vh, 480px);
  display: flex;
  align-items: center;
}

.mg-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--mg-bg-rgb), 0.15) 0%, rgba(var(--mg-bg-rgb), 0.78) 62%, rgba(var(--mg-bg-rgb), 0.96) 100%),
    radial-gradient(circle at 70% 20%, rgba(var(--mg-brand-rgb), 0.38), transparent 42%),
    radial-gradient(circle at 20% 70%, rgba(215, 181, 109, 0.22), transparent 40%),
    linear-gradient(145deg, #0f454a 0%, #164248 40%, #0c2228 100%);
  animation: mg-hero-pan 14s ease-in-out infinite alternate;
}

.mg-hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px 20px 32px;
}

.mg-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  animation: mg-fade-up 0.7s ease both;
}

.mg-hero-cta {
  display: flex;
  justify-content: center;
}

.mg-hero-visual {
  width: min(100%, 520px);
  margin: 0 auto;
  aspect-ratio: auto;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  animation: mg-fade-up 0.85s ease both;
}

.mg-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.mg-eyebrow {
  margin: 0 0 12px;
  color: var(--mg-accent);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mg-eyebrow-icon,
.mg-point-icon,
.mg-btn-icon,
.mg-product-icon,
.mg-step-icon,
.mg-channel-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.mg-eyebrow-icon {
  width: 18px;
  height: 18px;
}

.mg-eyebrow-icon svg,
.mg-point-icon svg,
.mg-btn-icon svg,
.mg-product-icon svg,
.mg-step-icon svg,
.mg-channel-icon svg,
.mg-eyebrow-icon .mg-icon-img,
.mg-point-icon .mg-icon-img,
.mg-product-icon .mg-icon-img,
.mg-step-icon .mg-icon-img {
  width: 100%;
  height: 100%;
  fill: currentColor;
  object-fit: contain;
  display: block;
}

.mg-btn-icon {
  width: 18px;
  height: 18px;
}

.mg-hero-title {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.mg-hero-brand {
  font-family: var(--mg-display);
  font-size: clamp(2rem, 8vw, 2.55rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff7df, #f0d48a 45%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mg-hero-line {
  font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  font-weight: 700;
}

.mg-hero-points {
  list-style: none;
  margin: 0 auto 16px;
  padding: 0;
  display: inline-grid;
  gap: 10px;
  text-align: left;
}

.mg-hero-points li {
  color: #d8e8ec;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mg-point-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #102226;
  background: linear-gradient(135deg, #9aebe0, var(--mg-teal));
}

.mg-hero-lead {
  margin: 0 0 22px;
  color: var(--mg-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.mg-btn:hover {
  transform: translateY(-1px);
}

.mg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.mg-btn-primary {
  color: #102226;
  background: linear-gradient(135deg, #f3df9f, #d7b56d 55%, #c39a45);
  box-shadow: 0 12px 28px rgba(201, 162, 74, 0.35);
}

.mg-btn-ghost {
  color: var(--mg-text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.mg-btn-block {
  width: 100%;
}

.mg-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}

.mg-section {
  padding: 34px 0 10px;
  animation: mg-fade-up 0.65s ease both;
}

.mg-auth,
.mg-account,
.mg-wallet,
.mg-page {
  width: min(100%, var(--mg-form-max));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--mg-gutter);
  padding-right: var(--mg-gutter);
}

/* 客服等宽页：外层走 .mg-shell，本身不再另设窄宽 */
.mg-support {
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

.mg-support-layout {
  display: grid;
  gap: 8px;
}

.mg-support-aside,
.mg-support-main {
  min-width: 0;
}

#faq,
#contact,
#line {
  scroll-margin-top: 96px;
}

.mg-support-aside .mg-subhead,
.mg-support-main .mg-subhead {
  margin-top: 0;
  margin-bottom: 12px;
}

.mg-section-head {
  margin: 0 auto 18px;
  text-align: center;
  max-width: 720px;
}

.mg-section-head h1,
.mg-section-head h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.35;
  color: #f5fafb;
}

.mg-section-head p {
  margin: 0;
  color: var(--mg-muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.mg-text-accent {
  color: var(--mg-accent);
  background: linear-gradient(90deg, #f3df9f, #d7b56d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mg-product-grid {
  display: grid;
  gap: 12px;
}

.mg-product {
  padding: 18px 16px;
  border-radius: var(--mg-radius);
  background: var(--mg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--mg-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.mg-product:hover {
  transform: translateY(-2px);
  border-color: rgba(215, 181, 109, 0.35);
}

.mg-product-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  margin-bottom: 12px;
  color: #102226;
  background: linear-gradient(135deg, #f0d48a, #c9a24a);
}

.mg-product h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #f5fafb;
}

.mg-product p {
  margin: 0;
  color: #9fb4bb;
  line-height: 1.65;
  font-size: 0.9rem;
}

/* 统一品牌青绿底，避免多色杂乱 */
.mg-product.tone-mint,
.mg-product.tone-sky,
.mg-product.tone-sand,
.mg-product.tone-coral,
.mg-product.tone-violet,
.mg-product.tone-ink {
  background: linear-gradient(160deg, rgba(var(--mg-brand-rgb), 0.14), rgba(255, 255, 255, 0.04));
}

.mg-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.mg-step {
  display: grid;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: var(--mg-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.mg-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mg-step-num {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--mg-display);
  font-weight: 800;
  color: #102226;
  background: linear-gradient(135deg, #9aebe0, var(--mg-teal));
}

.mg-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--mg-accent);
  background: rgba(215, 181, 109, 0.14);
}

.mg-step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #f5fafb;
}

.mg-step p {
  margin: 0;
  color: #9fb4bb;
  font-size: 0.9rem;
  line-height: 1.6;
}

.mg-center-cta {
  margin: 22px 0 8px;
  display: grid;
  gap: 12px;
}

/* 首頁底部：數據卡片 + 案例輪播 */
.mg-section-trust {
  padding-top: 10px;
  padding-bottom: 28px;
}

.mg-section-trust .mg-section-head {
  margin-bottom: 22px;
}

.mg-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mg-stat-card {
  padding: 18px 14px;
  border-radius: var(--mg-radius);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  box-shadow: var(--mg-shadow);
}

.mg-stat-value {
  margin: 0 0 8px;
  line-height: 1.1;
  color: var(--mg-accent);
  font-family: var(--mg-display);
}

.mg-stat-value strong {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mg-stat-value span {
  margin-left: 2px;
  font-size: 0.95rem;
  font-weight: 700;
}

.mg-stat-label {
  margin: 0;
  color: var(--mg-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.mg-cases-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.mg-cases-viewport {
  overflow: hidden;
  min-width: 0;
  --mg-case-width: 280px;
}

.mg-cases-track {
  display: flex;
  gap: 12px;
  will-change: transform;
  transition: none;
}

.mg-cases-track.is-animating {
  transition: transform 0.38s ease;
}

.mg-case-card {
  flex: 0 0 var(--mg-case-width);
  width: var(--mg-case-width);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--mg-radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--mg-shadow);
}

.mg-case-card.has-image {
  grid-template-columns: 96px 1fr;
  align-items: center;
}

.mg-case-media {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.mg-case-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mg-case-card.has-image .mg-case-body {
  min-width: 0;
}

.mg-case-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #102226;
}

.mg-case-thumb svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.mg-case-thumb .mg-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.mg-case-thumb.tone-mint {
  background: linear-gradient(145deg, #9aebe0, var(--mg-teal));
}

.mg-case-thumb.tone-sky {
  background: linear-gradient(145deg, #9fd4ff, #4a9fd4);
}

.mg-case-thumb.tone-sand {
  background: linear-gradient(145deg, #f0d48a, #c9a24a);
}

.mg-case-thumb.tone-coral {
  background: linear-gradient(145deg, #ffb4a8, #e87868);
}

.mg-case-thumb.tone-violet {
  background: linear-gradient(145deg, #c8b4ff, #8b6fd4);
}

.mg-case-thumb.tone-ink {
  background: linear-gradient(145deg, #b8c8d8, #5a7088);
}

.mg-case-body h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--mg-text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mg-case-body p {
  margin: 0 0 4px;
  font-size: 0.82rem;
  color: var(--mg-muted);
  line-height: 1.4;
}

.mg-case-body p span {
  color: #8aa8b0;
}

.mg-cases-nav {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mg-text);
  font-size: 1.35rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.mg-cases-nav:hover {
  background: rgba(var(--mg-brand-rgb), 0.22);
  border-color: rgba(var(--mg-brand-rgb), 0.45);
}

.mg-cases-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.mg-footer {
  width: 100%;
  padding: 28px 0 18px;
  color: var(--mg-muted);
}

.mg-footer-brand {
  margin: 0 0 8px;
  color: var(--mg-text);
  font-weight: 700;
}

.mg-footer-desc,
.mg-footer-links {
  font-size: 0.84rem;
  line-height: 1.6;
}

.mg-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
}

.mg-footer-links a {
  color: #d7e6ea;
  border-bottom: 1px solid rgba(215, 181, 109, 0.35);
}

.mg-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  height: calc(var(--mg-tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(8, 20, 24, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  z-index: 40;
}

.mg-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #8ea5ad;
  font-size: 0.72rem;
  border-radius: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.mg-tab-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.mg-tab-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mg-tab.is-active {
  color: #f0d48a;
  background: rgba(215, 181, 109, 0.12);
}

.mg-form {
  display: grid;
  gap: 14px;
}

.mg-field {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.mg-field span {
  color: var(--mg-muted);
}

.mg-field-hint {
  color: var(--mg-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.mg-field-error {
  color: #ff8f8f;
  font-size: 0.82rem;
  line-height: 1.4;
}

.mg-field.is-invalid input {
  border-color: rgba(255, 123, 123, 0.55);
}

.mg-form-error {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ff8f8f;
  font-size: 0.9rem;
  line-height: 1.45;
}

.mg-captcha-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.mg-captcha-refresh {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
}

.mg-captcha-refresh:hover {
  border-color: rgba(var(--mg-brand-rgb), 0.55);
}

.mg-captcha-img {
  display: block;
  width: 120px;
  height: 44px;
  object-fit: cover;
}

.mg-field input,
.mg-field select,
.mg-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--mg-text);
  border-radius: 14px;
  padding: 14px 14px;
  font: inherit;
  outline: none;
  box-sizing: border-box;
}

.mg-field select {
  appearance: none;
}

.mg-field input:focus,
.mg-field select:focus,
.mg-field textarea:focus {
  border-color: rgba(var(--mg-brand-rgb), 0.7);
  box-shadow: 0 0 0 3px rgba(var(--mg-brand-rgb), 0.18);
}

.mg-info-banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(215, 181, 109, 0.18);
  border: 1px solid rgba(215, 181, 109, 0.35);
  color: #f0d48a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.mg-info-banner-section {
  margin: 18px 0 8px;
  border-radius: 0;
  text-align: left;
}

.mg-personal-form .mg-field-inline,
.mg-bank-form .mg-field-inline {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-field-choice {
  align-items: center;
}

.mg-choice-group {
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.mg-choice {
  position: relative;
  min-width: 72px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mg-muted);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.mg-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mg-choice.is-active,
.mg-choice:has(input:checked) {
  color: #102226;
  border-color: rgba(180, 145, 70, 0.9);
  background: linear-gradient(135deg, #e2c36d, #b8923a);
}

.mg-choice.is-active > span,
.mg-choice:has(input:checked) > span {
  color: #102226;
  font-weight: 800;
}

.mg-info-list {
  border-radius: var(--mg-radius);
  background: var(--mg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 22px;
}

.mg-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  text-decoration: none;
  min-height: 58px;
}

.mg-info-item:last-child {
  border-bottom: 0;
}

.mg-info-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.mg-info-item-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mg-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #102226;
  background: linear-gradient(135deg, #f0d48a, #c9a24a);
  flex-shrink: 0;
}

.mg-info-item-title {
  font-weight: 700;
}

.mg-info-item-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  flex-shrink: 0;
}

.mg-info-item-status.is-done {
  color: #7ddea8;
}

.mg-info-item-status.is-todo {
  color: var(--mg-muted);
}

.mg-info-cta {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.mg-field-inline {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 10px;
}

.mg-field-inline > span {
  margin: 0;
  color: var(--mg-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.mg-field-inline input {
  text-align: right;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 0;
}

.mg-field-inline input:focus {
  box-shadow: none;
  border-bottom-color: rgba(215, 181, 109, 0.55);
}

.mg-field-inline input::placeholder {
  color: var(--mg-muted);
  text-align: right;
}

/* Number steppers sit to the right of the underline; values stay aligned */
.mg-personal-form {
  padding-right: 22px;
}

.mg-field-stepper .mg-stepper-row {
  position: relative;
  min-width: 0;
}

.mg-field-stepper .mg-stepper-row > input {
  width: 100%;
  -moz-appearance: textfield;
  appearance: textfield;
}

.mg-field-stepper .mg-stepper-row > input::-webkit-outer-spin-button,
.mg-field-stepper .mg-stepper-row > input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mg-stepper-btns {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  width: 16px;
  line-height: 1;
}

.mg-stepper-btn {
  display: grid;
  place-items: center;
  width: 16px;
  height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mg-muted);
  font-size: 8px;
  line-height: 1;
  cursor: pointer;
}

.mg-stepper-btn:hover,
.mg-stepper-btn:focus {
  color: var(--mg-accent);
  outline: none;
}

.mg-field-jump {
  display: block;
  padding: 12px 0;
  text-align: right;
  color: #f0d48a;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
}

.mg-field-jump:hover {
  color: #ffe2a3;
  border-bottom-color: rgba(215, 181, 109, 0.55);
}

.mg-id-form .mg-field-inline {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-id-upload-title {
  margin: 18px 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.mg-upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.mg-upload-grid-2 {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.mg-upload-card {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 150px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.mg-upload-cam {
  color: rgba(255, 255, 255, 0.35);
  line-height: 0;
}

.mg-info-submit-bar {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
}

.mg-upload-card-block {
  width: 100%;
  margin-bottom: 12px;
}

.mg-upload-card span {
  color: var(--mg-muted);
  font-size: 0.86rem;
}

.mg-upload-card em {
  color: #f0d48a;
  font-style: normal;
  font-weight: 700;
}

.mg-upload-card img,
.mg-upload-preview {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
}

.mg-upload-preview[src=""],
.mg-upload-preview:not([src]) {
  display: none !important;
}

.mg-upload-placeholder {
  display: grid;
  gap: 8px;
  place-items: center;
}

.mg-upload-placeholder[hidden] {
  display: none !important;
}

.mg-upload-card.has-preview {
  border-style: solid;
  border-color: rgba(215, 181, 109, 0.45);
}

.mg-upload-card input[type="file"],
.mg-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.mg-info-form input[readonly] {
  opacity: 1;
  cursor: default;
  color: var(--mg-text);
  -webkit-text-fill-color: var(--mg-text);
}

.mg-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mg-loan-apply-page {
  width: min(100%, 640px);
  margin-inline: auto;
}

.mg-loan-apply-head h1 {
  text-align: center;
  margin-bottom: 12px;
}

.mg-loan-banner {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #061a20;
  line-height: 0;
}

.mg-loan-banner img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.mg-loan-ticker {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mg-loan-ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
  color: #f0b35a;
  font-size: 0.86rem;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.mg-loan-ticker-item.is-in {
  transform: translateY(0);
  opacity: 1;
}

.mg-loan-ticker-item.is-out {
  transform: translateY(-110%);
  opacity: 0;
}

.mg-loan-apply-form {
  display: grid;
  gap: 18px;
}

.mg-loan-summary {
  text-align: center;
  padding: 8px 0 4px;
}

.mg-loan-hero-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.mg-loan-amount-box {
  min-width: min(100%, 260px);
  padding: 6px 14px 4px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.mg-loan-hero-amount.is-editing .mg-loan-amount-box {
  border-color: #f0b35a;
  background: rgba(240, 179, 90, 0.14);
  box-shadow: 0 0 0 3px rgba(240, 179, 90, 0.18);
  animation: mg-loan-amount-pulse 0.9s ease 1;
}

@keyframes mg-loan-amount-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.mg-loan-amount-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f0b35a;
  font-size: clamp(2.2rem, 8vw, 3rem);
  font-weight: 800;
  text-align: center;
  padding: 0;
  outline: none;
  -moz-appearance: textfield;
}

.mg-loan-amount-input::-webkit-outer-spin-button,
.mg-loan-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mg-loan-edit-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mg-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.mg-loan-edit-btn:hover {
  color: var(--mg-text);
  border-color: rgba(215, 181, 109, 0.45);
}

.mg-loan-hero-amount.is-editing .mg-loan-edit-btn {
  background: #f0b35a;
  color: #102226;
  border-color: #f0b35a;
}

.mg-loan-edit-hint {
  margin: 0 0 8px;
  color: #f0b35a;
  font-size: 0.88rem;
  font-weight: 600;
}

.mg-loan-edit-hint[hidden] {
  display: none !important;
}

.mg-loan-rate-note {
  margin: 0 0 16px;
  color: var(--mg-muted);
  font-size: 0.88rem;
}

.mg-loan-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mg-loan-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
  color: var(--mg-text);
}

.mg-loan-stats span {
  color: var(--mg-muted);
  font-size: 0.78rem;
}

.mg-loan-control {
  display: grid;
  gap: 10px;
}

.mg-loan-control-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.mg-loan-control-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(215, 181, 109, 0.18);
  color: #f0d48a;
  font-size: 0.75rem;
}

.mg-loan-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #7ec8ff 0%,
    #7ec8ff var(--mg-range-pct, 0%),
    rgba(255, 255, 255, 0.16) var(--mg-range-pct, 0%),
    rgba(255, 255, 255, 0.16) 100%
  );
  outline: none;
}

.mg-loan-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #9fd0ff;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.mg-loan-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #9fd0ff;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.mg-loan-range-ends {
  display: flex;
  justify-content: space-between;
  color: var(--mg-muted);
  font-size: 0.82rem;
}

.mg-loan-term-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mg-loan-term {
  cursor: pointer;
}

.mg-loan-term input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mg-loan-term span {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--mg-muted);
  background: transparent;
  font-size: 0.9rem;
  transition: 0.15s ease;
}

.mg-loan-term.is-active span,
.mg-loan-term:has(input:checked) span {
  color: #102226;
  background: #f0d48a;
  font-weight: 700;
}

.mg-loan-apply-actions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 4px;
}

body.mg-modal-open {
  overflow: hidden;
}

.mg-loan-modal[hidden] {
  display: none !important;
}

.mg-loan-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px 16px;
}

.mg-loan-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
}

.mg-loan-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  padding: 22px 18px 18px;
  border-radius: 16px;
  background: #f7f8fa;
  color: #222;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.mg-loan-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #ef4d4d;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mg-loan-modal-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #222;
}

.mg-loan-slip {
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 10px 10px 0 0;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.mg-loan-slip::after {
  content: "";
  display: block;
  height: 12px;
  background:
    radial-gradient(circle at 8px 0, transparent 7px, #f7f8fa 8px) repeat-x;
  background-size: 16px 12px;
  background-position: -4px 0;
  margin-top: -1px;
}

.mg-loan-slip-amount {
  text-align: center;
  padding: 22px 16px 14px;
  border-bottom: 1px solid #eee;
}

.mg-loan-slip-amount strong {
  display: block;
  color: #e23b3b;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.mg-loan-slip-amount small {
  font-size: 1rem;
  margin-left: 2px;
  font-weight: 700;
}

.mg-loan-slip-amount > span {
  display: block;
  margin-top: 6px;
  color: #8a9199;
  font-size: 0.86rem;
}

.mg-loan-slip-mid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 16px 8px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

.mg-loan-slip-mid > div:first-child {
  border-right: 1px solid #eee;
}

.mg-loan-slip-mid strong {
  display: block;
  font-size: 1.05rem;
  color: #222;
  margin-bottom: 4px;
}

.mg-loan-slip-mid span {
  color: #8a9199;
  font-size: 0.82rem;
}

.mg-loan-slip-rows {
  display: grid;
  gap: 10px;
  padding: 14px 16px 18px;
}

.mg-loan-slip-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}

.mg-loan-slip-rows span {
  color: #8a9199;
}

.mg-loan-slip-rows strong {
  color: #222;
  font-weight: 600;
}

.mg-loan-modal-panel .mg-btn-primary {
  border-radius: 999px;
}

.mg-loan-detail-panel {
  width: min(100%, 420px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px 14px 16px;
  background: #f2f3f5;
}

.mg-loan-detail-block {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e6e8ec;
  margin-bottom: 12px;
  overflow: hidden;
}

.mg-loan-detail-block-head {
  padding: 10px 14px;
  border-bottom: 1px solid #eef0f3;
}

.mg-loan-detail-block-head strong {
  font-size: 0.95rem;
  color: #222;
}

.mg-loan-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 4px;
  color: #8a9199;
  font-size: 0.82rem;
}

.mg-loan-progress-meta em {
  font-style: normal;
  color: #444;
}

.mg-loan-progress-steps {
  list-style: none;
  margin: 8px 10px 14px;
  padding: 18px 6px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.mg-loan-progress-steps::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 26px;
  height: 3px;
  background: #e5e7eb;
  z-index: 0;
}

.mg-loan-progress-steps[data-active="1"]::after,
.mg-loan-progress-steps[data-active="2"]::after,
.mg-loan-progress-steps[data-active="3"]::after,
.mg-loan-progress-steps[data-active="4"]::after {
  content: "";
  position: absolute;
  left: 12%;
  top: 26px;
  height: 3px;
  background: #f0b35a;
  z-index: 1;
}

.mg-loan-progress-steps[data-active="1"]::after { width: 0; }
.mg-loan-progress-steps[data-active="2"]::after { width: 25%; }
.mg-loan-progress-steps[data-active="3"]::after { width: 50%; }
.mg-loan-progress-steps[data-active="4"]::after { width: 76%; }

.mg-loan-progress-steps li {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #b0b6be;
  font-size: 0.72rem;
}

.mg-loan-progress-steps li i {
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #d7dbe2;
  box-shadow: 0 0 0 3px #fff;
}

.mg-loan-progress-steps li.is-done,
.mg-loan-progress-steps li.is-current {
  color: #333;
  font-weight: 600;
}

.mg-loan-progress-steps li.is-done i,
.mg-loan-progress-steps li.is-current i {
  background: #f0b35a;
}

.mg-loan-progress-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}

.mg-loan-progress-facts > div {
  text-align: center;
  padding: 12px 8px;
  border-radius: 8px;
  background: #f7f8fa;
}

.mg-loan-progress-facts strong {
  display: block;
  margin-bottom: 4px;
  color: #222;
  font-size: 1.05rem;
}

.mg-loan-progress-facts strong.is-amount {
  color: #e23b3b;
}

.mg-loan-progress-facts span {
  color: #8a9199;
  font-size: 0.8rem;
}

.mg-loan-detail-notice {
  padding: 12px 14px 14px;
  color: #444;
  font-size: 0.9rem;
  line-height: 1.6;
}

.mg-loan-detail-notice p {
  margin: 0;
}

.mg-loan-detail-notice span {
  color: #222;
  font-weight: 700;
}

.mg-loan-detail-notice em {
  font-style: normal;
}

.mg-loan-detail-table {
  margin: 0;
  padding: 4px 0;
}

.mg-loan-detail-table > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 0.9rem;
}

.mg-loan-detail-table > div:last-child {
  border-bottom: 0;
}

.mg-loan-detail-table dt {
  margin: 0;
  color: #8a9199;
}

.mg-loan-detail-table dd {
  margin: 0;
  color: #222;
  font-weight: 600;
  text-align: right;
}

.mg-contracts {
  width: min(100%, 800px);
  margin-inline: auto;
}

.mg-contract-switch {
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.mg-contract-switch > span {
  color: var(--mg-muted);
  font-size: 0.88rem;
}

.mg-contract-switch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mg-contract-switch-item {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--mg-muted);
  text-decoration: none;
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.03);
}

.mg-contract-switch-item small {
  color: #f0d48a;
}

.mg-contract-switch-item.is-active,
.mg-contract-switch-item:hover {
  border-color: rgba(240, 179, 90, 0.5);
  color: var(--mg-text);
  background: rgba(240, 179, 90, 0.08);
}

#mg-contract-modal .mg-loan-modal-panel,
.mg-contract-modal-panel {
  width: min(100%, 520px);
  max-height: calc(100vh - 40px);
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  background: #fff !important;
  color: #222;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

#mg-contract-modal .mg-loan-modal-title,
.mg-contract-modal-panel .mg-loan-modal-title {
  margin: 0 0 10px;
  color: #222;
}

.mg-contract-modal-scroll {
  overflow: auto;
  max-height: min(72vh, 640px);
  padding-right: 4px;
  background: #fff;
}

.mg-contract-modal-item[hidden] {
  display: none !important;
}

.mg-contract-doc {
  background: #fff;
  color: #222;
  border-radius: 12px;
  padding: 22px 18px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
  line-height: 1.7;
}

#mg-contract-modal .mg-contract-doc,
.mg-contract-doc--modal {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 4px 2px 8px !important;
}

.mg-contract-title {
  margin: 0 0 16px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111;
}

.mg-contract-meta,
.mg-contract-parties {
  margin-bottom: 14px;
}

.mg-contract-meta p,
.mg-contract-parties p {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.mg-contract-meta span,
.mg-contract-parties span {
  color: #666;
}

.mg-contract-lead {
  margin: 0 0 14px;
  padding: 12px;
  background: #f7f8fa;
  border-radius: 8px;
  font-size: 0.92rem;
}

.mg-contract-lead p {
  margin: 0;
}

.mg-contract-articles p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #333;
}

.mg-contract-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e8eaed;
}

.mg-contract-sign-col p {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.mg-contract-sign-img {
  display: block;
  width: min(100%, 220px);
  max-height: 90px;
  object-fit: contain;
  background: #f3f5f7;
  border: 1px dashed #cfd5dc;
  border-radius: 6px;
}

.mg-contract-sign-missing {
  color: #999 !important;
  font-size: 0.86rem !important;
}

.mg-contract-foot-date {
  margin: 16px 0 0;
  text-align: right;
  color: #666;
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .mg-contract-sign {
    grid-template-columns: 1fr;
  }
}

.mg-loans-cta {
  margin: 0 0 16px;
}

.mg-loan-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.mg-loan-card {
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.mg-loan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.mg-loan-no {
  color: var(--mg-muted);
  font-size: 0.86rem;
}

.mg-loan-status {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.mg-loan-status.is-pending {
  background: rgba(230, 180, 70, 0.2);
  color: #f0d48a;
}

.mg-loan-status.is-approved,
.mg-loan-status.is-disbursed {
  background: rgba(70, 180, 120, 0.18);
  color: #8fe0b0;
}

.mg-loan-status.is-rejected {
  background: rgba(214, 54, 56, 0.28);
  color: #ff8e8e;
  font-weight: 700;
}

.mg-loan-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  margin-bottom: 14px;
  padding: 4px 0 2px;
}

.mg-loan-card-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
  color: var(--mg-text);
  font-weight: 800;
}

.mg-loan-card-stats strong.is-rate {
  color: #ff6b6b;
}

.mg-loan-card-stats span {
  color: var(--mg-muted);
  font-size: 0.78rem;
}

.mg-loan-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mg-loan-date {
  color: var(--mg-muted);
  font-size: 0.82rem;
}

.mg-loan-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mg-loan-action {
  appearance: none;
  border: 1px solid rgba(240, 179, 90, 0.55);
  background: transparent;
  color: #f0d48a;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}

.mg-loan-action:hover {
  background: rgba(240, 179, 90, 0.12);
  color: #ffe2a3;
}

.mg-sign-label {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}

.mg-sign-hint {
  margin: 0 0 14px;
  color: var(--mg-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.mg-sign-pad-wrap {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-bottom: 18px;
}

.mg-sign-pad {
  width: 100%;
  border: 2px dashed #8b95a1;
  border-radius: 8px;
  background: #eceff1;
  overflow: hidden;
  box-sizing: border-box;
}

.mg-sign-canvas {
  display: block;
  width: 100%;
  height: 240px;
  border: 0;
  touch-action: none;
  background: transparent;
  cursor: crosshair;
}

.mg-sign-reset {
  min-width: 72px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.mg-sign-current {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mg-sign-current span {
  color: var(--mg-muted);
  font-size: 0.86rem;
}

.mg-sign-current img {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mg-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mg-muted);
  font-size: 0.9rem;
}

.mg-auth-switch {
  margin-top: 18px;
  text-align: center;
  color: var(--mg-muted);
}

.mg-auth-switch a {
  color: var(--mg-accent);
  font-weight: 700;
}

.mg-profile-card,
.mg-balance-card,
.mg-empty-card,
.mg-list-card,
.mg-channel,
.mg-mine-top,
.mg-mine-balance,
.mg-mine-menu {
  border-radius: var(--mg-radius);
  background: var(--mg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* —— 個人中心（對齊參考站資訊架構） —— */
.mg-mine-top {
  padding: 20px 18px 16px;
  margin-bottom: 12px;
  background:
    linear-gradient(160deg, rgba(var(--mg-brand-rgb), 0.22), rgba(215, 181, 109, 0.1) 50%, rgba(255, 255, 255, 0.03));
}

.mg-mine-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.mg-mine-profile-text span {
  display: block;
  color: var(--mg-muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.mg-mine-profile-text strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mg-mine-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mg-mine-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--mg-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.mg-mine-shortcut:hover {
  border-color: rgba(215, 181, 109, 0.45);
  transform: translateY(-1px);
}

.mg-mine-shortcut-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #102226;
  background: linear-gradient(135deg, #f0d48a, #c9a24a);
}

.mg-mine-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(145deg, rgba(215, 181, 109, 0.2), rgba(var(--mg-brand-rgb), 0.12) 60%, rgba(255, 255, 255, 0.03));
}

.mg-mine-balance span {
  color: var(--mg-muted);
  font-size: 0.92rem;
}

.mg-mine-balance strong {
  font-family: var(--mg-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f0d48a;
}

.mg-mine-menu {
  overflow: hidden;
  margin-bottom: 18px;
}

.mg-mine-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  text-decoration: none;
}

.mg-mine-menu-item:last-child {
  border-bottom: 0;
}

.mg-mine-menu-item:not(.is-static):hover {
  background: rgba(255, 255, 255, 0.03);
}

.mg-mine-menu-item span:first-child {
  font-weight: 600;
}

.mg-mine-menu-item strong {
  font-weight: 700;
  color: var(--mg-muted);
}

.mg-mine-chevron {
  color: var(--mg-muted);
  font-size: 1.25rem;
  line-height: 1;
}

.mg-mine-soon {
  color: rgba(215, 181, 109, 0.85) !important;
  font-size: 0.86rem;
  font-weight: 600 !important;
}

.mg-settings .mg-section-head p {
  display: none;
}

.mg-settings-version {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--mg-muted) !important;
  font-size: 0.9rem;
  font-weight: 600 !important;
}

.mg-settings-version .mg-mine-chevron {
  font-size: 1.15rem;
}

.mg-settings-logout {
  margin: 28px 0 8px;
  text-align: center;
}

.mg-settings-logout a {
  color: #f0d48a;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.mg-settings-logout a:hover {
  color: #fff;
}

.mg-mine-empty {
  text-align: center;
  padding: 28px 20px;
}

.mg-mine-empty-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.mg-mine-empty-hint {
  margin: 0 0 18px;
  color: var(--mg-muted);
  font-size: 0.9rem;
}

/* 返回個人中心 / 返回我的資料：與 ghost 按鈕統一 */
.mg-link-back,
a.mg-link-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  padding: 0 20px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--mg-text);
  background: transparent;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mg-link-back:hover,
a.mg-link-back:hover {
  color: var(--mg-text);
  transform: translateY(-1px);
}

.mg-mine-empty .mg-btn,
.mg-btn-row .mg-btn,
.mg-section > .mg-btn.mg-btn-block {
  width: 100%;
  margin-top: 14px;
}

.mg-mine-empty .mg-btn {
  margin-top: 0;
}

.mg-info-cta .mg-link-back,
.mg-info-submit-bar .mg-link-back,
.mg-center-cta .mg-link-back {
  margin-top: 0;
}

.mg-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.mg-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #102226;
  background: linear-gradient(135deg, #f0d48a, #c9a24a);
  flex-shrink: 0;
}

.mg-avatar-icon {
  display: block;
}

.mg-profile-card h1 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.mg-profile-card p {
  margin: 0;
  color: var(--mg-muted);
  font-size: 0.9rem;
}

.mg-list-card {
  overflow: hidden;
  margin-bottom: 18px;
}

.mg-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-list-item:last-child {
  border-bottom: 0;
}

.mg-list-item span {
  color: var(--mg-muted);
}

.mg-list-item strong {
  font-weight: 700;
}

.mg-balance-card {
  padding: 22px 18px;
  margin-bottom: 14px;
  background:
    linear-gradient(145deg, rgba(var(--mg-brand-rgb), 0.28), rgba(215, 181, 109, 0.12) 55%, rgba(255, 255, 255, 0.04));
}

.mg-balance-card span {
  display: block;
  color: var(--mg-muted);
  margin-bottom: 8px;
}

.mg-balance-card strong {
  display: block;
  font-family: var(--mg-display);
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.mg-wallet-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
}

.mg-wallet-user-text span {
  display: block;
  color: var(--mg-muted);
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.mg-wallet-user-text strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.mg-wallet-hero {
  position: relative;
  padding: 28px 18px 18px;
  margin-bottom: 14px;
  border-radius: 16px;
  text-align: center;
  color: #f5fafb;
  background:
    linear-gradient(160deg, #1a262b 0%, #12191c 55%, #0d1417 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.mg-wallet-hero-amount {
  display: block;
  font-family: var(--mg-display);
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.mg-wallet-hero-label {
  display: block;
  margin-top: 8px;
  color: rgba(245, 250, 251, 0.72);
  font-size: 0.9rem;
}

.mg-wallet-hero-loan {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 18px 0 0;
  color: rgba(245, 250, 251, 0.78);
  font-size: 0.78rem;
}

.mg-wallet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 10px;
  text-align: center;
}

.mg-wallet-stats span {
  display: block;
  color: var(--mg-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  margin-bottom: 6px;
}

.mg-wallet-stats strong {
  display: block;
  font-family: var(--mg-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.mg-wallet-withdraw-action {
  display: flex;
  justify-content: center;
  margin: 6px 0 22px;
}

.mg-wallet-withdraw-btn {
  width: min(100%, 280px);
  min-height: 46px;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.mg-withdraw-modal-panel {
  width: min(100%, 320px);
  padding: 22px 18px 12px;
  text-align: center;
}

.mg-withdraw-modal-tip {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: #666;
  line-height: 1.5;
}

.mg-withdraw-modal-tip.is-error {
  color: #e53935;
  font-weight: 600;
}

.mg-withdraw-code-input {
  width: 100%;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #d0d4da;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font: inherit;
  text-align: center;
  letter-spacing: 0.06em;
}

.mg-withdraw-code-input:focus {
  outline: none;
  border-color: var(--mg-teal);
  box-shadow: 0 0 0 3px rgba(var(--mg-brand-rgb), 0.18);
}

.mg-withdraw-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  border-top: 1px solid #eceff3;
  padding-top: 4px;
}

.mg-withdraw-modal-cancel,
.mg-withdraw-modal-submit {
  flex: 1;
  min-height: 44px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  color: #2f6fed;
}

.mg-withdraw-modal-cancel:hover,
.mg-withdraw-modal-submit:hover {
  opacity: 0.82;
}

.mg-wallet-accounts {
  margin: 0 0 16px;
}

.mg-wallet-accounts-head {
  display: flex;
  align-items: flex-end;
  margin-bottom: 12px;
}

.mg-wallet-accounts-head h2 {
  margin: 0;
  font-size: 1.05rem;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--mg-accent);
}

.mg-wallet-card-strip {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 18px;
  border-radius: 10px;
  color: #f5fffe;
  background: linear-gradient(90deg, var(--mg-teal), #1a9d95 55%, var(--mg-teal-deep));
  box-shadow: 0 10px 22px rgba(18, 144, 136, 0.28);
  user-select: none;
  pointer-events: none;
}

.mg-wallet-card-strip span {
  font-family: var(--mg-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.mg-wallet-card-strip.is-empty {
  pointer-events: auto;
  background: linear-gradient(90deg, rgba(var(--mg-brand-rgb), 0.45), rgba(18, 144, 136, 0.55));
  border: 1px dashed rgba(255, 255, 255, 0.22);
}

.mg-wallet-card-strip.is-empty span {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  color: rgba(245, 255, 254, 0.88);
}

.mg-wallet-desc {
  margin: 0 0 18px;
  padding: 16px 16px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.mg-wallet-desc h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 700;
}

.mg-wallet-desc p {
  margin: 0;
  color: var(--mg-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.mg-wallet-desc-link {
  display: inline-block;
  margin-top: 12px;
  color: #f0d48a;
  font-size: 0.88rem;
  font-weight: 600;
}

.mg-wallet-withdraw-panel {
  margin: 0 0 18px;
  padding-top: 4px;
  scroll-margin-top: 88px;
}

.mg-wallet-fold {
  margin: 0 0 18px;
}

.mg-wallet-fold .mg-withdraw-list,
.mg-wallet-fold .mg-tx-list {
  margin-bottom: 0;
}

.mg-wallet-fold:not(.is-open) .mg-wallet-fold-extra {
  display: none;
}

.mg-wallet-fold-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #f0d48a;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.mg-wallet-fold-btn:hover {
  background: rgba(240, 212, 138, 0.1);
}

.mg-wallet-safe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 22px 0 4px;
  color: #67e0a3;
  font-size: 0.82rem;
}

.mg-wallet-bank {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.mg-wallet-bank-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mg-wallet-bank-head a {
  color: #f0d48a;
  text-decoration: none;
  font-size: 0.88rem;
}

.mg-wallet-bank p {
  margin: 0 0 4px;
  color: var(--mg-text);
}

.mg-wallet-bank-name,
.mg-wallet-bank-empty {
  color: var(--mg-muted) !important;
  font-size: 0.88rem;
}

.mg-withdraw-form {
  margin: 0 0 22px;
  width: min(100%, var(--mg-form-max));
}

.mg-withdraw-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.mg-withdraw-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.mg-withdraw-item strong {
  display: block;
  color: #f0d48a;
  margin-bottom: 4px;
}

.mg-withdraw-item small {
  display: block;
  color: var(--mg-muted);
  font-size: 0.8rem;
}

.mg-balance-card p {
  margin: 0;
  color: #c5d7dc;
  font-size: 0.84rem;
}

.mg-subhead {
  margin: 8px 0 12px;
  font-size: 1.05rem;
}

.mg-bills-block {
  margin: 0 0 22px;
}

.mg-bills-block-title {
  margin: 0 0 10px;
  padding-left: 2px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #d7e4e8;
}

.mg-bills-block-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-right: 8px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f0d48a, #c39a45);
  vertical-align: -0.1em;
}

.mg-bills-block-list .mg-bills-block-title::before {
  background: linear-gradient(180deg, #7ec8c4, #2a9a94);
}

.mg-bills-overview {
  margin: 0;
  padding: 20px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(215, 181, 109, 0.32), rgba(var(--mg-brand-rgb), 0.14) 55%, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(240, 212, 138, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.mg-bills-overview-main span {
  display: block;
  color: var(--mg-muted);
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.mg-bills-overview-main strong {
  display: block;
  font-family: var(--mg-display);
  font-size: 2.15rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.mg-bills-overview-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.mg-bills-overview-meta span {
  display: block;
  color: var(--mg-muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.mg-bills-overview-meta strong {
  font-size: 1.02rem;
  color: #f5fafb;
  font-weight: 700;
}

.mg-bills-overview-tip {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  color: #e8d7a8;
  font-size: 0.82rem;
  line-height: 1.55;
}

.mg-bills-detail-link {
  display: inline-flex;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #f0d48a;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.mg-bills-detail-link:hover {
  color: #fff;
}

.mg-bills-detail-panel {
  width: min(100%, 420px);
  max-height: min(86vh, 640px);
  overflow: auto;
}

.mg-bills-detail-body {
  padding: 0 2px 4px;
}

.mg-bills-detail-total {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f3faf8;
  border: 1px solid #cfe8e2;
  color: #0a6b5a;
  font-size: 1.02rem;
  font-weight: 700;
}

.mg-bills-detail-total strong {
  color: #0a6b5a;
}

.mg-bills-detail-total span {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 0.82rem;
  font-weight: 500;
}

.mg-bills-detail-empty {
  margin: 0;
  color: #777;
  font-size: 0.84rem;
  line-height: 1.55;
}

.mg-bills-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border: 1px solid #e6e9ef;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.mg-bills-detail-list li {
  padding: 12px 14px;
  border-top: 1px solid #eef1f5;
}

.mg-bills-detail-list li:first-child {
  border-top: 0;
}

.mg-bills-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #222;
  font-size: 0.92rem;
}

.mg-bills-detail-reason {
  flex-shrink: 0;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8a5a00;
  background: #fff4d6;
  border-radius: 999px;
  padding: 2px 8px;
}

.mg-bills-detail-reason.is-severe {
  color: #fff;
  background: #d63638;
}

.mg-bills-detail-plan {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6f7f8;
}

.mg-bills-detail-plan-label {
  display: block;
  margin-bottom: 2px;
  color: #666;
  font-size: 0.76rem;
  font-weight: 700;
}

.mg-bills-detail-plan small {
  color: #777;
  font-size: 0.78rem;
  line-height: 1.45;
}

.mg-bills-detail-reason-line {
  margin: 6px 0 0;
  color: #8a5a00;
  font-size: 0.8rem;
  font-weight: 700;
}

.mg-bills-detail-reason-line.is-severe {
  color: #d63638;
}

.mg-bills-detail-list li.is-severe-adjust {
  border-left: 3px solid #d63638;
}

.mg-bills-detail-meta {
  display: block;
  margin-bottom: 8px;
  color: #888;
  font-size: 0.78rem;
}

.mg-bills-detail-amounts {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: #555;
}

.mg-bills-detail-amounts b {
  font-weight: 700;
  color: #222;
}

.mg-bills-detail-amounts .is-remain {
  color: #0a6b5a;
}

.mg-bills-detail-amounts .is-remain b {
  color: #0a6b5a;
}

.mg-bills-detail-list small {
  color: #888;
  font-size: 0.78rem;
}

.mg-bills-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.mg-bills-item {
  padding: 14px 14px 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(126, 200, 196, 0.55);
  background: rgba(8, 22, 28, 0.55);
}

.mg-bills-item.is-pending {
  border-left-color: #e85d5d;
}

.mg-bills-item.is-overdue {
  border-left-color: #d63638;
  box-shadow: inset 0 0 0 1px rgba(214, 54, 56, 0.18);
}

.mg-bills-item.is-claimed {
  border-left-color: #5b9bd5;
}

.mg-bills-item.is-paid {
  border-left-color: #3cb371;
  opacity: 0.92;
}

.mg-bills-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mg-bills-amount {
  color: #f5fafb;
  font-size: 1.2rem;
  font-weight: 700;
}

.mg-bills-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2em;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.mg-bills-status.is-pending {
  color: #fff;
  background: #d63638;
  box-shadow: 0 4px 12px rgba(214, 54, 56, 0.35);
}

.mg-bills-status.is-paid {
  color: #fff;
  background: #0a7a36;
  font-size: 0.88rem;
  font-weight: 700;
}

.mg-bills-status.is-overdue {
  color: #fff;
  background: #b32d2e;
  box-shadow: 0 4px 12px rgba(179, 45, 46, 0.4);
  font-size: 1rem;
}

.mg-bills-status.is-claimed {
  color: #fff;
  background: #2271b1;
  font-size: 0.88rem;
}

.mg-bills-item-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--mg-muted);
  font-size: 0.86rem;
}

.mg-bills-item-foot {
  margin-top: 8px;
}

.mg-bills-item-foot small {
  color: #8aa3ab;
  font-size: 0.78rem;
}

.mg-bills-claim-form {
  margin-top: 12px;
}

.mg-bills-claim-btn {
  min-height: 42px;
  font-size: 0.95rem;
}

.mg-bills-claim-hint {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(125, 170, 220, 0.12);
  color: #b7d0ea;
  font-size: 0.86rem;
  text-align: center;
}

.mg-bills-note {
  margin: 8px 0 16px;
  text-align: center;
  color: var(--mg-muted);
  font-size: 0.86rem;
}

.mg-tx-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.mg-tx-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-tx-item strong {
  display: block;
  margin-bottom: 4px;
}

.mg-tx-item small {
  color: var(--mg-muted);
}

.mg-tx-amount {
  font-weight: 700;
  white-space: nowrap;
}

.mg-tx-amount.is-in { color: var(--mg-success); }
.mg-tx-amount.is-out { color: #ffb4a8; }

.mg-empty-card {
  padding: 28px 18px;
  text-align: center;
}

.mg-empty-card p {
  margin: 0 0 16px;
  color: var(--mg-muted);
}

.mg-line-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 16px;
  margin-bottom: 14px;
  border-radius: var(--mg-radius);
  border: 1px solid rgba(6, 199, 85, 0.35);
  background: linear-gradient(145deg, rgba(6, 199, 85, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: var(--mg-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mg-line-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 199, 85, 0.55);
}

.mg-line-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #06c755; /* LINE brand green */
}

.mg-line-card-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  display: block;
}

.mg-line-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mg-line-card-body strong {
  font-size: 1.05rem;
}

.mg-line-card-body span {
  color: var(--mg-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.mg-line-card-body em {
  font-style: normal;
  color: #9aebe0;
  font-size: 0.86rem;
}

.mg-line-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #062226;
  background: #06c755;
  white-space: nowrap;
}

.mg-support-meta {
  list-style: none;
  margin: 0 0 22px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--mg-muted);
  font-size: 0.92rem;
}

.mg-support-channels {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.mg-channel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
}

.mg-channel-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #102226;
  background: linear-gradient(135deg, #9aebe0, var(--mg-teal));
}

.mg-channel strong {
  display: block;
  margin-bottom: 4px;
}

.mg-channel span span {
  color: var(--mg-muted);
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  .mg-line-card {
    grid-template-columns: auto 1fr;
  }

  .mg-line-card-cta {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Support page: columns top-aligned on desktop */
@media (min-width: 768px) {
  .mg-support .mg-section-head {
    text-align: center;
    margin: 0 0 22px;
    max-width: none;
  }
}

@media (min-width: 1024px) {
  .mg-support-layout {
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.15fr);
    column-gap: 40px;
    row-gap: 8px;
    align-items: start;
  }

  .mg-support-layout > .mg-section-head {
    grid-column: 1 / -1;
    text-align: center;
    margin: 0 0 8px;
  }

  .mg-support-aside,
  .mg-support-main {
    align-self: start;
  }

  .mg-support-aside .mg-subhead,
  .mg-support-main .mg-subhead {
    margin: 0 0 14px;
    min-height: 1.4em;
    line-height: 1.4;
  }

  .mg-support .mg-faq-list {
    margin-bottom: 0;
  }
}

.mg-faq-list {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.mg-faq {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 4px 14px;
}

.mg-faq summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
  list-style: none;
}

.mg-faq summary::-webkit-details-marker {
  display: none;
}

.mg-faq p {
  margin: 0 0 14px;
  color: var(--mg-muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.mg-content {
  color: var(--mg-muted);
  line-height: 1.75;
}

.mg-content h3 {
  color: var(--mg-text);
}

.mg-page .mg-section-head h1 {
  font-size: 1.5rem;
}

.mg-page-wide {
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

.mg-prose {
  max-width: 820px;
  margin: 0 auto;
}

.mg-prose h3 {
  margin: 28px 0 10px;
  font-size: 1.12rem;
}

.mg-prose p {
  margin: 0 0 14px;
}

.mg-prose ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
}

.mg-prose li {
  color: var(--mg-muted);
}

.mg-prose .mg-btn {
  margin-top: 8px;
}

@media (min-width: 768px) {
  .mg-page-wide .mg-section-head {
    text-align: center;
    max-width: none;
  }
}

@keyframes mg-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mg-hero-pan {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.5%, -1%, 0); }
}

/* Tablet */
@media (min-width: 768px) {
  :root {
    --mg-gutter: 28px;
  }

  body.moneygo-body {
    background-attachment: fixed;
  }

  .mg-app {
    padding-bottom: 40px;
  }

  .mg-topbar-inner {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .mg-brand-logo {
    height: 44px;
    max-width: 300px;
  }

  .mg-desktop-nav {
    display: flex;
  }

  .mg-btn-top.mg-btn-primary {
    display: inline-flex;
  }

  .mg-tabbar {
    display: none;
  }

  .mg-hero {
    padding-top: 28px;
    padding-bottom: 8px;
  }

  .mg-hero-panel {
    min-height: 420px;
  }

  /* 平板：左右约对半分，避免左文固定宽度把右图挤扁 */
  .mg-hero-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 32px 28px;
  }

  .mg-hero-content {
    flex: 1 1 50%;
    min-width: 0;
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .mg-hero-title {
    align-items: flex-start;
  }

  .mg-hero-points {
    margin-left: 0;
    margin-right: 0;
    width: auto;
  }

  .mg-hero-lead {
    max-width: none;
  }

  .mg-hero-cta {
    justify-content: flex-start;
  }

  .mg-hero-visual {
    flex: 1 1 50%;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    aspect-ratio: auto;
    align-self: center;
  }

  .mg-hero-brand {
    font-size: clamp(2rem, 3.6vw, 2.8rem);
  }

  .mg-hero-line {
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  }

  .mg-section {
    padding-top: 48px;
    padding-bottom: 16px;
  }

  .mg-section-head h1,
  .mg-section-head h2 {
    font-size: 1.7rem;
  }

  .mg-product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .mg-steps {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .mg-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
  }

  .mg-footer {
    padding-top: 40px;
    padding-bottom: 36px;
  }

  .mg-footer-inner {
    display: grid;
    gap: 10px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  :root {
    --mg-gutter: 48px;
    --mg-max: 1400px;
  }

  .mg-hero {
    padding-top: 32px;
    padding-bottom: 8px;
  }

  .mg-hero-panel {
    min-height: 520px;
    border-radius: 32px;
  }

  .mg-hero-grid {
    padding: 48px 44px;
    gap: 48px;
  }

  .mg-hero-content {
    flex: 1 1 50%;
    max-width: none;
  }

  .mg-hero-visual {
    flex: 1 1 50%;
    min-width: 0;
    max-width: none;
    margin: 0;
  }

  .mg-hero-brand {
    font-size: clamp(2.4rem, 4vw, 3.2rem);
  }

  .mg-hero-line {
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  }

  .mg-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .mg-steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .mg-step {
    gap: 14px;
    min-height: 180px;
  }

  .mg-center-cta {
    margin-top: 28px;
  }

  .mg-cases-nav {
    width: 40px;
    height: 40px;
  }

  .mg-support-channels {
    grid-template-columns: 1fr 1fr;
  }

  .mg-footer-inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }

  .mg-footer-links {
    justify-content: flex-end;
  }
}

/* Wide desktop */
@media (min-width: 1440px) {
  :root {
    --mg-gutter: 56px;
    --mg-max: 1520px;
  }

  .mg-hero-panel {
    min-height: 560px;
  }

  .mg-hero-grid {
    gap: 56px;
    padding: 56px 48px;
  }

  .mg-hero-content {
    flex: 1 1 50%;
    max-width: none;
  }

  .mg-hero-visual {
    flex: 1 1 50%;
    max-width: none;
  }

  .mg-section-head h1,
  .mg-section-head h2 {
    font-size: 1.85rem;
  }
}

@media (max-width: 767px) {
  .mg-hero-visual {
    width: min(100%, 480px);
    aspect-ratio: auto;
  }

  .mg-cases-carousel {
    position: relative;
    display: block;
    padding: 0 40px;
  }

  .mg-cases-viewport {
    width: 100%;
  }

  .mg-cases-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
    background: rgba(12, 34, 40, 0.88);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  }

  .mg-cases-prev {
    left: 0;
  }

  .mg-cases-next {
    right: 0;
  }

  .mg-case-card {
    padding: 12px;
    gap: 10px;
  }

  .mg-case-card.has-image {
    grid-template-columns: 76px 1fr;
    align-items: start;
  }

  .mg-case-media {
    width: 76px;
    height: 76px;
  }

  .mg-case-body h3 {
    font-size: 0.86rem;
    line-height: 1.42;
  }

  .mg-case-body p {
    font-size: 0.78rem;
  }
}

/* Small phones */
@media (max-width: 379px) {
  :root {
    --mg-gutter: 14px;
  }

  .mg-hero-brand {
    font-size: 1.75rem;
  }

  .mg-btn-row {
    grid-template-columns: 1fr;
  }
}
