:root {
  --bg: #efefef;
  --text: #171717;
  --muted: #8a8a8a;
  --line: #d9d9d9;
  --accent: #ff4255;
  --purple-solid: #736cf5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  color: var(--text);
}
.app-shell {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.screen { display: none; min-height: 100vh; padding: 24px 22px 110px; }
.screen.active { display: block; }
.card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.soft { box-shadow: none; border: 1px solid #e6e6e6; }
.dark {
  background: #4b4b4b;
  color: #fff;
  border-radius: 12px;
}
.top-mini, .splash-badge {
  width: fit-content;
  padding: 6px 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 4px;
}
.splash-badge { margin: 140px auto 0; }
.splash-copy { text-align: center; margin-top: 180px; }
.small-copy { font-size: 20px; margin: 0 0 6px; }
.accent-copy { color: #58b8ff; font-size: 32px; font-weight: 700; margin: 0; }
.splash-copy h1 { font-size: 48px; line-height: 1.15; margin: 6px 0 0; }
.bracelet-hero { position: relative; width: 270px; height: 270px; margin: 60px auto 0; }
.ring {
  width: 230px; height: 230px; border: 14px solid #c8c8c8; border-radius: 50%;
  position: absolute; left: 20px; top: 20px; transform: rotate(20deg);
  box-shadow: inset 0 0 0 8px #ececec;
}
.tag {
  width: 70px; height: 40px; border-radius: 14px; background: linear-gradient(135deg, #f8f8f8, #bbbbbb);
  position: absolute; right: 40px; bottom: 52px; transform: rotate(18deg);
}
.spark { position: absolute; color: #59beff; font-size: 18px; }
.s1 { left: 18px; top: 34px; }
.s2 { right: 20px; bottom: 26px; color: #a388ff; }
.notice-copy { text-align: center; color: #c3c3c3; font-size: 14px; margin-top: 120px; }
.close-btn {
  position: absolute; top: 26px; right: 18px; font-size: 42px; border: 0; background: transparent;
}
#pin .top-mini { margin: 8px auto 0; }
.pin-body { text-align: center; margin-top: 138px; }
.pin-body h2 { font-size: 28px; line-height: 1.35; margin: 0; font-weight: 600; }
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 34px 0 60px; }
.pin-dots span {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid #a7a7a7; background: transparent;
}
.pin-dots span.filled { background: var(--accent); border-color: var(--accent); }
.qr-btn {
  border: 2px solid #d8d8d8; background: #fff; border-radius: 20px; padding: 16px 34px;
  font-size: 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; min-width: 0;
}
.chip-ico { font-size: 24px; }
.nowrap { white-space: nowrap; }
.forgot-btn {
  display: block; margin: 86px 0 12px auto; border: 0; background: transparent; color: #777;
  text-decoration: underline; font-size: 18px;
}
.pad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px 10px;
  background: #e7e7e7;
}
.pad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.pad-actions {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 8px;
  margin-top: 8px;
}
.pad button {
  height: 56px;
  border: 1px solid #dadada;
  border-radius: 9px;
  background: #f9f9f9;
  font-size: 24px;
  color: #2b2b2b;
}
.pad .ghost{visibility:hidden;background:transparent;border-color:transparent;}
.pad .confirm {
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.pad .delete {
  font-size: 22px;
  color: #7a7a7a;
}
.home-header, .card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px;
}
.header-icons { display: flex; gap: 14px; font-size: 22px; align-items: center; }
.header-icons-plain { gap: 18px; }
.header-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.fallback-header {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.icon-bubble {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.85);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.hero-banner { padding: 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.pill-row { display: flex; gap: 8px; margin-bottom: 10px; }
.pill {
  display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.pill.blue { background: #e7f3ff; color: #287ee8; }
.pill.violet { background: #f1ebff; color: #7651ea; }
.hero-banner h3 { margin: 0; font-size: 21px; line-height: 1.35; }
.hero-banner p { margin: 6px 0 0; font-size: 15px; color: #666; }
.hero-thumb {
  width: 92px; height: 92px; border-radius: 14px; background: linear-gradient(135deg, #b8d5ff, #ffd5ea);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 24px;
}
.quick-row { display: grid; grid-template-columns: 1fr 1fr 2.2fr; gap: 12px; margin-top: 10px; }
.quick-card { border: 0; padding: 18px; text-align: left; font-size: 18px; min-height: 108px; }
.quick-card.small { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 18px; }
.quick-card.small b { font-size: 16px; line-height: 1; }
.quick-emoji { font-size: 28px; }
.quick-card.purple {
  background: var(--purple-solid); color: #fff; font-size: 20px; position: relative; overflow: hidden; display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 18px 20px; min-height: 108px;
}
.purple-copy {
  position: relative; z-index: 2; line-height: 1.18; display: flex; flex-direction: column; gap: 8px; font-size: 18px; font-weight: 500; text-align: left;
}
.purple-copy span:last-child { font-size: 20px; }
.card-side-icon {
  position: absolute; right: 14px; bottom: 12px; width: 86px; height: 56px; object-fit: contain; z-index: 2;
}
.card-side-fallback {
  position: absolute; right: 20px; bottom: 22px; font-size: 28px; color: rgba(255,255,255,.94); display: none; z-index: 2;
}
.quick-card.purple::after {
  content: ''; position: absolute; width: 122px; height: 122px; right: -24px; bottom: -36px;
  background: rgba(255,255,255,.10); border-radius: 50%;
}
.history-link {
  border: 0; background: transparent; font-size: 20px; margin: 18px 0 12px; padding: 0; color: #444;
}
.history-link span { font-size: 28px; vertical-align: middle; }
.payment-banner { padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; font-size: 16px; margin-bottom: 16px; }
.icon-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 10px; padding: 24px 10px; text-align: center; font-size: 16px;
}
.icon-grid div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.grid-emoji {
  width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; font-size: 24px; box-shadow: inset 0 0 0 1px #f0f0f0;
}
.grid-emoji img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.grid-emoji .fb { display: none; align-items: center; justify-content: center; width: 100%; height: 100%; }
.icon-grid em { font-style: normal; font-size: 14px; color: #444; }
.money-banner {
  margin-top: 18px; background: linear-gradient(135deg, #59beff, #69c8f4); color: #fff; border-radius: 20px;
  padding: 28px 22px; font-size: 28px; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(430px, 100%);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: #fff; border-top: 1px solid #e6e6e6; padding: 8px 8px 18px;
}
.bottom-nav button {
  border: 0; background: transparent; color: #9b9b9b; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; justify-content: center;
}
.bottom-nav button span, .bottom-nav button img, .bottom-nav button .nav-fb {
  font-size: 22px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; object-fit: contain;
}
.bottom-nav small { font-size: 12px; }
.bottom-nav button.active { color: #000; font-weight: 700; }
.nav-fb { display: none; }
.card-header button { border: 0; background: transparent; font-size: 34px; }
.card-header h2 { margin: 0; font-size: 26px; }
.tabs { display: flex; gap: 24px; margin-bottom: 18px; font-size: 18px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: #9a9a9a; padding: 0 0 10px; font-size: 18px; font-weight: 700; }
.tabs button.active { color: #000; border-bottom: 4px solid #000; }
.id-card { overflow: hidden; }
.id-top {
  height: 320px;
  background: linear-gradient(135deg, #edf5f8, #f7fbff 45%, #dee9fb);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.id-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
}
.id-top-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06) 36%, rgba(255,255,255,.12));
  backdrop-filter: blur(.5px);
}
.watermark {
  position: absolute; left: 22px; top: 18px; font-weight: 900; letter-spacing: 1px; color: rgba(74,74,74,.32); font-size: 22px;
}
.portrait-wrap {
  width: 190px;
  height: 250px;
  margin: 0 auto;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  background: rgba(255,255,255,.18);
}
.portrait::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.02) 40%, rgba(0,0,0,.06));
}
.portrait {
  width: 138px; height: 194px; margin: 28px auto 0; background: linear-gradient(180deg, rgba(239,239,239,.92), rgba(214,214,214,.92)); border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08); position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(1px);
}
.avatar-head {
  width: 74px; height: 74px; border-radius: 50%; background: #c5c5c5; position: absolute; left: 50%; top: 42px; transform: translateX(-50%);
}
.avatar-body {
  width: 126px; height: 118px; border-radius: 70px 70px 18px 18px; background: #b8b8b8; position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
}
.id-main { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; padding: 26px; }
.id-main .muted { color: #888; font-size: 15px; margin: 0 0 12px; }
.id-main h3 { font-size: 34px; margin: 0 0 28px; }
.birth { font-size: 28px; font-weight: 700; margin: 0 0 16px; }
.status-line { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #4cc979; box-shadow: 0 0 0 6px #eefaf2; }
.status { font-size: 20px; font-weight: 700; margin: 0; }
.fake-qr {
  width: 170px; height: 170px; background:
    linear-gradient(90deg,#000 10px,transparent 10px) 0 0/34px 34px,
    linear-gradient(#000 10px,transparent 10px) 0 0/34px 34px,
    linear-gradient(90deg,transparent 24px,#000 24px 34px,transparent 34px) 0 0/34px 34px,
    linear-gradient(transparent 24px,#000 24px 34px,transparent 34px) 0 0/34px 34px,
    #fff;
  border: 12px solid #fff;
  box-shadow: 0 0 0 1px #ddd inset;
}
.timer-row { margin-top: 18px; }
.timer-bar { height: 8px; background: #e6e6e6; border-radius: 99px; overflow: hidden; }
.timer-bar span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #6daeff, #9f6ff4); }
.timer-row p { margin: 10px 0 0; font-size: 16px; color: #666; }
.timer-row strong { color: #69a8ff; }
.id-links { display: flex; justify-content: space-between; padding: 0 26px 24px; }
.id-links button, .detail-toggle { border: 0; background: transparent; font-size: 18px; color: #444; }
.detail-toggle {
  width: 100%; padding: 22px; background: #f6f6f6; border-top: 1px solid #ececec; font-size: 20px;
}
.detail-panel { display: none; padding: 20px 26px 28px; border-top: 1px solid #ececec; background: #fff; }
.detail-panel.open { display: block; }
.action-box { margin: 18px 0 0; padding: 26px; font-size: 22px; text-align: center; }
.triple-box { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.triple-box div { padding: 24px 10px; text-align: center; font-size: 18px; border-right: 1px solid #ececec; display: flex; flex-direction: column; gap: 8px; }
.triple-box div:last-child { border-right: 0; }
@media (max-width: 390px) {
  .pin-body h2 { font-size: 29px; }
  .quick-row { grid-template-columns: 1fr 1fr 2fr; }
  .id-main { grid-template-columns: 1fr; }
}
.btn-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}
.fallback-icon { display: none; }
.service-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}
.quick-card.small .fallback-icon {
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
}
.quick-card.small img + .fallback-icon,
.qr-btn img + .fallback-icon {
  display: none;
}
.qr-btn .fallback-icon {
  font-size: 24px;
}


.hero-thumb{
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.hero-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}


.hero-image-panel{
  padding:0;
  overflow:hidden;
  display:block;
}
.hero-image-panel img{
  display:block;
  width:100%;
  height:auto;
  object-fit:cover;
}


/* top banner replaced by single image */
.hero-image{
  padding:0;
  overflow:hidden;
  margin-bottom:18px;
}
.hero-image img{
  display:block;
  width:100%;
  height:auto;
  object-fit:cover;
}

/* bottom nav: only user-provided PNGs on the PNG tabs */
.bottom-nav{
  align-items:start;
}
.bottom-nav button{
  gap:4px;
  min-height:52px;
}
.bottom-nav button.text-only{
  justify-content:center;
  padding-top:10px;
}
.bottom-nav button.text-only small{
  margin-top:6px;
}
.bottom-nav button.img-only img{
  width:24px;
  height:24px;
  object-fit:contain;
  display:block;
}
.bottom-nav button.img-only small,
.bottom-nav button.text-only small{
  font-size:12px;
  line-height:1.1;
}
.bottom-nav button span,
.bottom-nav .nav-fb{
  display:none !important;
}


.home-extra{
  margin-top:18px;
}
.extra-banner{
  border-radius:18px;
  overflow:hidden;
  background:#dfe8f5;
}
.extra-banner img{
  display:block;
  width:100%;
  height:auto;
  object-fit:cover;
}

.mission-panel{
  margin-top:18px;
  background:#fff;
  border-radius:16px;
  padding:18px 14px;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
}
.mission-row{
  width:100%;
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 6px;
  text-align:left;
}
.mission-row + .mission-row{
  margin-top:2px;
}
.mission-row img{
  width:28px;
  height:28px;
  object-fit:contain;
  flex:0 0 auto;
}
.mission-row span{
  font-size:16px;
  line-height:1.35;
  color:#222;
}

.money-cards{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.money-card{
  background:#fff;
  border-radius:14px;
  min-height:160px;
  padding:18px 14px;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
}
.money-card img{
  width:30px;
  height:30px;
  object-fit:contain;
}
.money-card span{
  margin-top:18px;
  font-size:17px;
  line-height:1.3;
  text-align:left;
  word-break:keep-all;
}

.bottom-nav{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:min(100%,390px);
  height:calc(84px + env(safe-area-inset-bottom));
  padding:8px 0 env(safe-area-inset-bottom);
  background:#fff;
  border-top:1px solid #e5e5e5;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  z-index:50;
}
.bottom-nav .nav-btn{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
}
.bottom-nav .nav-btn img{
  width:24px;
  height:24px;
  object-fit:contain;
}
.bottom-nav .nav-btn small{
  font-size:11px;
  line-height:1.15;
  color:#9d9d9d;
}
.bottom-nav .nav-btn.active small{
  color:#111;
  font-weight:700;
}
.bottom-nav .nav-btn.text-only{
  justify-content:center;
}
.bottom-nav .nav-btn.text-only small{
  margin-top:8px;
}


/* home header: one-line larger icons */
.home-header .header-icons-plain{
  gap: 20px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.home-header .header-img{
  width: 40px;
  height: 40px;
}
.home-header .fallback-header{
  width: 40px;
  height: 40px;
  font-size: 32px;
}

/* extended home section */
.home-extra{
  margin-top: 18px;
}
.extra-banner{
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}
.extra-banner img{
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.mission-panel{
  margin-top: 18px;
  padding: 18px 18px 20px;
  border-radius: 18px;
}
.mission-row{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  text-align: left;
}
.mission-row img{
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}
.mission-row span{
  font-size: 16px;
  line-height: 1.35;
  color: #222;
}
.mission-row + .mission-row{
  border-top: 0;
}

.money-cards{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.money-card{
  min-height: 154px;
  padding: 18px 16px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.money-card img{
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.money-card span{
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.28;
  text-align: left;
  word-break: keep-all;
}

/* keep bottom nav fixed and clean */
.bottom-nav .nav-btn img{
  width: 24px;
  height: 24px;
  object-fit: contain;
}


/* remove old blue promo banner spacing if any */
.money-banner{display:none !important;}

/* top-right icons: bigger and locked to one row */
.home-header .header-icons-plain{
  display:flex !important;
  flex-wrap:nowrap !important;
  white-space:nowrap !important;
  align-items:center !important;
  gap:16px !important;
}
.home-header .header-img{
  width:42px !important;
  height:42px !important;
  object-fit:contain !important;
}
.home-header .fallback-header{
  width:42px !important;
  height:42px !important;
  font-size:32px !important;
}

/* newly added sections: clean white, no dark borders/outlines */
.extra-banner,
.mission-panel,
.money-card{
  background:#fff !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
}
.mission-panel,
.money-card{
  border-radius:18px !important;
}
.mission-row,
.money-card,
.bottom-nav .nav-btn{
  border:0 !important;
  outline:0 !important;
  -webkit-appearance:none;
  appearance:none;
}
.mission-row{
  background:#fff !important;
}
.money-card{
  min-height:160px !important;
}
.money-card span{
  font-size:17px !important;
  line-height:1.3 !important;
}

/* bottom fixed menu: larger overall, especially icons */
.bottom-nav{
  padding:10px 10px 20px !important;
  gap:0 !important;
}
.bottom-nav .nav-btn{
  gap:7px !important;
  min-height:56px !important;
}
.bottom-nav .nav-btn img,
.bottom-nav button img{
  width:30px !important;
  height:30px !important;
}
.bottom-nav .nav-btn small,
.bottom-nav small{
  font-size:13px !important;
  line-height:1.15 !important;
}
.bottom-nav button span,
.bottom-nav button .nav-fb{
  width:30px !important;
  height:30px !important;
  font-size:26px !important;
}

/* keep extra section spacing tidy after removing promo banner */
.home-extra{
  margin-top:18px !important;
}


/* mission list: uniform icon size and light square like reference */
.mission-row{
  gap: 12px !important;
  padding: 12px 0 !important;
}
.mission-row img{
  width: 32px !important;
  height: 32px !important;
  padding: 5px !important;
  background: #f1f1f1 !important;
  border-radius: 6px !important;
  object-fit: contain !important;
  flex: 0 0 32px !important;
}
.mission-row span{
  font-size: 15px !important;
  line-height: 1.35 !important;
}

/* money cards: same icon scale/placement */
.money-cards{
  gap: 10px !important;
}
.money-card{
  min-height: 146px !important;
  padding: 16px 14px !important;
}
.money-card img{
  width: 38px !important;
  height: 38px !important;
  padding: 6px !important;
  background: #f3f3f3 !important;
  border-radius: 7px !important;
  object-fit: contain !important;
}
.money-card span{
  margin-top: 16px !important;
  font-size: 15px !important;
  line-height: 1.28 !important;
}

/* top-right home icons: strict single-line alignment and same size */
.home-header .header-icons,
.home-header .header-icons-plain{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  gap: 14px !important;
}
.home-header .header-img{
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  flex: 0 0 32px !important;
}
.home-header .fallback-header{
  width: 32px !important;
  height: 32px !important;
  font-size: 28px !important;
  line-height: 32px !important;
  flex: 0 0 32px !important;
}

/* bottom nav: unify icon sizes and add QR icon block so all 5 match */
.bottom-nav{
  padding: 8px 8px 18px !important;
}
.bottom-nav .nav-btn{
  gap: 5px !important;
  min-height: 54px !important;
  align-items: center !important;
}
.bottom-nav .nav-btn img{
  width: 26px !important;
  height: 26px !important;
  object-fit: contain !important;
  flex: 0 0 26px !important;
}
.bottom-nav .nav-btn small{
  font-size: 12px !important;
  line-height: 1.1 !important;
}
.bottom-nav .nav-btn.text-only{
  justify-content: flex-start !important;
}
.bottom-nav .nav-btn.text-only::before{
  content: "";
  width: 26px;
  height: 26px;
  display: block;
  background: url("assets/service_qr.png") center/contain no-repeat;
  flex: 0 0 26px;
}
.bottom-nav .nav-btn.text-only small{
  margin-top: 0 !important;
}

/* general nav text/image vertical rhythm */
.bottom-nav button,
.bottom-nav .nav-btn{
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
}


/* enlarge requested icons */
.money-card img{
  width: 46px !important;
  height: 46px !important;
  padding: 7px !important;
  flex: 0 0 46px !important;
}
.mission-row img{
  width: 36px !important;
  height: 36px !important;
  padding: 5px !important;
  flex: 0 0 36px !important;
}
.bottom-nav .nav-btn img{
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
}
.bottom-nav .nav-btn.text-only::before{
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
  background-size: contain !important;
}

/* top-right icons: force identical box sizing and baseline */
.home-header{
  align-items: center !important;
}
.home-header .header-icons,
.home-header .header-icons-plain{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
  line-height: 0 !important;
}
.home-header .top-icon-btn{
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  flex: 0 0 34px !important;
}
.home-header .top-icon-btn img,
.home-header .header-img{
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  object-fit: contain !important;
  display: block !important;
  transform: translateY(0) !important;
}


/* mission list closer to reference */
.mission-panel{
  padding: 16px 18px 18px !important;
  border-radius: 18px !important;
}
.mission-row{
  gap: 12px !important;
  padding: 13px 0 !important;
  min-height: 46px !important;
}
.mission-row img{
  width: 30px !important;
  height: 30px !important;
  padding: 4px !important;
  background: #f1f1f1 !important;
  border-radius: 5px !important;
  object-fit: contain !important;
  flex: 0 0 30px !important;
}
.mission-row span{
  font-size: 15px !important;
  line-height: 1.32 !important;
  color: #2b2b2b !important;
  letter-spacing: -0.1px !important;
}

/* money cards closer to reference */
.money-cards{
  gap: 10px !important;
}
.money-card{
  min-height: 132px !important;
  padding: 16px 14px 14px !important;
  border-radius: 12px !important;
}
.money-card img{
  width: 40px !important;
  height: 40px !important;
  padding: 6px !important;
  background: #f3f3f3 !important;
  border-radius: 6px !important;
  object-fit: contain !important;
  flex: 0 0 40px !important;
}
.money-card span{
  margin-top: 14px !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  color: #313131 !important;
  word-break: keep-all !important;
}

/* header right icons: strict same boxes + visual alignment */
.home-header{
  align-items: center !important;
}
.home-header .header-icons,
.home-header .header-icons-plain{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  line-height: 0 !important;
}
.home-header .header-img,
.home-header .top-icon-btn img{
  display: block !important;
  object-fit: contain !important;
}
.home-header .header-img:nth-of-type(1){
  width: 34px !important;
  height: 34px !important;
}
.home-header .header-img:nth-of-type(2){
  width: 28px !important;
  height: 28px !important;
}
.home-header .fallback-header{
  display: none !important;
}

/* bottom nav matched sizing */
.bottom-nav{
  padding: 6px 8px 16px !important;
  height: calc(78px + env(safe-area-inset-bottom)) !important;
  background: #fff !important;
  align-items: start !important;
}
.bottom-nav .nav-btn{
  gap: 4px !important;
  min-height: 52px !important;
  justify-content: flex-start !important;
}
.bottom-nav .nav-btn img{
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
}
.bottom-nav .nav-btn small{
  font-size: 11px !important;
  line-height: 1.1 !important;
  color: #8c8c8c !important;
}
.bottom-nav .nav-btn.active small{
  color: #111 !important;
  font-weight: 700 !important;
}
.bottom-nav .nav-btn:nth-child(2) img{
  filter: brightness(0) !important;
}
.bottom-nav .nav-btn:nth-child(2) small{
  color: #111 !important;
  font-weight: 700 !important;
}
.bottom-nav .nav-qr-btn{
  position: relative !important;
}
.bottom-nav .nav-qr-bubble{
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  background: #f6eded !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.bottom-nav .nav-qr-bubble img{
  width: 19px !important;
  height: 19px !important;
}
.bottom-nav .nav-btn:last-child img{
  width: 23px !important;
  height: 23px !important;
}


.grid-action{
  border:0;
  background:transparent;
  padding:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
#event.screen{
  padding-bottom:28px;
}
.event-header button{
  border:0;
  background:transparent;
  font-size:34px;
}
.event-tabs{
  display:flex;
  gap:24px;
  margin:12px 0 10px;
  border-bottom:1px solid #e2e2e2;
}
.event-tabs button{
  border:0;
  background:transparent;
  padding:14px 0 12px;
  font-size:16px;
  font-weight:700;
  color:#9c9c9c;
  position:relative;
}
.event-tabs button.active{
  color:#111;
}
.event-tabs button.active::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-1px;
  height:3px;
  border-radius:999px;
  background:#111;
}
.event-pane{ display:none; }
.event-pane.active{ display:block; }
.event-card{
  margin-top:14px;
  border-radius:18px;
  overflow:hidden;
  background:#ddd;
}
.event-card img{
  display:block;
  width:100%;
  height:auto;
  object-fit:cover;
}
.winners-pane{
  min-height:62vh;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:20px;
}
.winners-pane .winner-empty-icon{
  width:62px;
  height:62px;
  border-radius:50%;
  border:4px solid #d7d7d7;
  color:#d7d7d7;
  font-size:34px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
}
.winners-pane p{
  margin:0;
  font-size:18px;
  font-weight:700;
}
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.38);
  display:none;
  z-index:40;
}
.overlay.show{ display:block; }
.modal{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  display:none;
  z-index:41;
}
.modal.show{ display:block; }
.center-modal{
  top:76px;
  width:min(calc(100% - 48px),384px);
  background:#fff;
  border-radius:22px;
  padding:22px 22px 24px;
}
.modal-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
}
.modal-title-row h3{
  margin:0 auto;
  font-size:22px;
  font-weight:800;
}
.modal-close{
  border:0;
  background:transparent;
  font-size:34px;
  line-height:1;
}
.verify-card{
  height:126px;
  border-radius:20px;
  background:linear-gradient(135deg,#2d3048,#242741);
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.verify-card strong{
  font-size:22px;
}
.verify-card p{
  margin:0;
  font-size:16px;
}
.verify-caption{
  margin-top:24px;
  font-size:13px;
  color:#28434f;
}
.verify-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-top:18px;
  font-size:17px;
}
.tiny-pill{
  border:0;
  background:#f0f0f0;
  border-radius:14px;
  padding:7px 14px;
  font-size:15px;
}
.verify-history-btn{
  width:100%;
  height:56px;
  margin-top:42px;
  border:0;
  border-radius:10px;
  background:#f4f4f4;
  font-size:18px;
  font-weight:500;
}
.dark-solid{
  background:#2d2d2d;
  color:#fff;
  margin-top:18px;
}
.bottom-sheet{
  width:min(430px, 100%);
  bottom:0;
  background:#fff;
  border-radius:24px 24px 0 0;
  padding-top:22px;
}
.sheet-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:0 22px 16px;
}
.sheet-head h3{
  margin:0;
  font-size:22px;
  font-weight:800;
}
.sheet-head p{
  margin:14px 0 0;
  color:#d56478;
  font-size:15px;
  line-height:1.5;
}
.sheet-line{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 22px;
  border-top:1px solid #ececec;
  font-size:17px;
}
.sheet-line.large{
  font-size:18px;
}
.sheet-line span:last-child{
  margin-left:auto;
  color:#888;
}
.check-circle{
  width:30px;
  height:30px;
  border-radius:50%;
  border:2px solid #bbb;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#888;
  font-weight:700;
}
.sheet-submit{
  width:100%;
  height:60px;
  border:0;
  background:#2d2d2d;
  color:#fff;
  font-size:20px;
  font-weight:600;
  margin-top:4px;
}
.small-dialog{
  top:160px;
  width:min(calc(100% - 64px),360px);
  background:#fff;
  border-radius:18px;
  padding:28px 0 0;
  text-align:center;
}
.dialog-brand{
  color:#ff5868;
  font-size:32px;
  font-weight:900;
  letter-spacing:2px;
}
.small-dialog p{
  margin:18px 26px 26px;
  font-size:18px;
  line-height:1.6;
}
.dialog-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  border-top:1px solid #e8e8e8;
}
.dialog-actions button{
  border:0;
  background:#fff;
  height:72px;
  font-size:20px;
  font-weight:700;
}
.dialog-actions .danger{
  color:#f05e74;
}
.settings-modal .modal-title-row h3{
  margin:0;
}
.field-block{
  display:block;
  font-size:15px;
  color:#555;
  margin-top:12px;
}
.field-block input{
  display:block;
  width:100%;
  height:48px;
  margin-top:8px;
  border:1px solid #ddd;
  border-radius:12px;
  padding:0 14px;
  font-size:16px;
}


/* overlay darker so bottom area dims like the rest */
.overlay{
  background: rgba(0,0,0,.52) !important;
}

/* bottom sheets should hide the fixed bottom nav */
.bottom-nav.force-hide{
  display:none !important;
}

/* sheet description text left aligned */
.sheet-head{
  align-items:flex-start !important;
}
.sheet-head > div{
  flex:1 1 auto;
}
.sheet-head p{
  text-align:left !important;
  margin-left:0 !important;
}


.sheet-head h3{
  text-align:left !important;
}
.sheet-head p{
  text-align:left !important;
  margin-left:0 !important;
  padding-left:0 !important;
  align-self:flex-start !important;
}
.overlay{
  background:rgba(0,0,0,.58) !important;
}


/* modal/nav final behavior */
.bottom-nav.force-hide{
  display:none !important;
}
.bottom-nav.dimmed{
  filter: brightness(.42) !important;
}

/* bottom sheet header fully left aligned */
.sheet-head{
  position:relative !important;
  display:block !important;
  padding:0 56px 16px 22px !important;
}
.sheet-head > div{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
}
.sheet-head h3{
  display:block !important;
  width:100% !important;
  margin:0 !important;
  text-align:left !important;
}
.sheet-head p{
  display:block !important;
  width:100% !important;
  margin:14px 0 0 0 !important;
  text-align:left !important;
  padding:0 !important;
}
.bottom-sheet .modal-close{
  position:absolute !important;
  right:16px !important;
  top:0 !important;
}
