:root {
    --gold: #D4A843; --gold-b: #E8C56A; --gold-d: #A07820;
    --gp: rgba(212,168,67,.10); --gm: rgba(212,168,67,.22); --gb: rgba(212,168,67,.38);
    --green: #1FA86A; --earth: #4A3420; --earth-l: #6B4A2C;
    --ink: #0A0C14; --ink-2: #12141F; --ink-3: #1C1F2E;
    --line: rgba(212,168,67,.16); --line-2: rgba(255,255,255,.07);
    --txt: #EDE6D6; --txt-2: #9A9384; --txt-3: #5E5A50;
    --fn: 'Space Grotesk', sans-serif; --fm: 'Space Mono', monospace;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  body {
    background: var(--ink); color: var(--txt); font-family: var(--fn);
    line-height: 1.6; overflow-x: hidden; min-height: 100vh;
    background-image:
      radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212,168,67,.10), transparent 70%),
      radial-gradient(ellipse 60% 40% at 50% 110%, rgba(74,52,32,.35), transparent 70%);
    background-attachment: fixed;
  }
  .wrap { max-width: 720px; margin: 0 auto; padding: 0 22px; }

  /* header */
  header { padding: 20px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0;
    background: rgba(10,12,20,.82); backdrop-filter: blur(10px); z-index: 50; }
  .brandrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
  .brand .m { color: var(--gold); }
  .molecoin { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #14161f;
    box-shadow: 0 0 0 1px var(--gb), 0 0 16px rgba(212,168,67,.2); }
  .head-right { display: flex; align-items: center; gap: 10px; }
  .lang { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
  .lang button { background: transparent; border: none; padding: 5px 9px; font-size: 11px; font-weight: 600;
    color: var(--txt-2); cursor: pointer; border-right: 1px solid var(--line); font-family: var(--fn); }
  .lang button:last-child { border-right: none; }
  .lang button.active { background: var(--gold); color: var(--ink); }

  /* hero */
  .hero { padding: 60px 0 34px; text-align: center; }
  .eyebrow { font-family: var(--fm); font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 18px; }
  .mole-big { width: 130px; height: 130px; margin: 0 auto 26px; border-radius: 50%;
    background: #101019; position: relative; overflow: hidden;
    box-shadow: 0 0 0 1px var(--gb), 0 0 50px rgba(212,168,67,.22), inset 0 -18px 30px rgba(0,0,0,.5); }
  .mole-big img { width: 100%; height: 100%; object-fit: cover; }
  .mole-big::after { content: ''; position: absolute; inset: -8px; border-radius: 50%;
    border: 1px solid var(--line); animation: ring 8s linear infinite; }
  @keyframes ring { to { transform: rotate(360deg); } }
  h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; margin-bottom: 14px; }
  h1 .g { color: var(--gold); }
  .lede { font-size: 15.5px; color: var(--txt-2); max-width: 48ch; margin: 0 auto; }
  .lede em { color: var(--gold-b); font-style: normal; font-weight: 600; }

  /* seal progress rail */
  .rail { margin: 40px 0 10px; }
  .rail-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
  .rail-top .t { font-family: var(--fm); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--txt-2); }
  .rail-top .c { font-family: var(--fm); font-size: 13px; color: var(--gold); font-weight: 700; }
  .seals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .seal { border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; background: linear-gradient(180deg, var(--ink-2), var(--ink));
    position: relative; overflow: hidden; transition: border-color .3s, transform .15s; }
  .seal.done { border-color: var(--gb); box-shadow: 0 0 0 1px var(--gm), 0 8px 30px rgba(212,168,67,.08); }
  .seal.done::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent); }
  .seal-ico { font-size: 26px; margin-bottom: 10px; filter: grayscale(1) opacity(.5); transition: filter .3s; }
  .seal.done .seal-ico { filter: none; }
  .seal-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
  .seal-desc { font-size: 11.5px; color: var(--txt-3); line-height: 1.5; min-height: 32px; }
  .seal-status { margin-top: 12px; font-family: var(--fm); font-size: 10px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--txt-3); display: flex; align-items: center; gap: 6px; }
  .seal.done .seal-status { color: var(--gold); }
  .seal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--txt-3); }
  .seal.done .seal-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
  .seal-act { margin-top: 12px; }
  .seal-btn { width: 100%; font-family: var(--fn); font-size: 12.5px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--gb); background: var(--gp); color: var(--gold-b); border-radius: 8px; padding: 8px; transition: background .15s; }
  .seal-btn:hover { background: var(--gm); }
  .seal-btn:disabled { opacity: .4; cursor: not-allowed; }
  .seal.done .seal-btn { border-color: var(--line-2); background: transparent; color: var(--txt-3); cursor: default; }
  /* Deposit: SEALED 여도 추가 등록 가능하면 활성 스타일 유지 */
  .seal.done .seal-btn.can-add { border-color: var(--gb); background: var(--gm); color: var(--gold); cursor: pointer; }
  .seal.done .seal-btn.can-add:hover { background: var(--gb); color: #1a1206; }

  /* the dig — main interaction */
  .dig { margin: 34px 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
    background: linear-gradient(180deg, var(--ink-2), #0d0f18); position: relative; }
  .dig-inner { padding: 34px 28px; text-align: center; }
  .dig-locked .mound { filter: grayscale(.6) brightness(.7); }
  .mound { font-size: 60px; margin-bottom: 10px; transition: filter .4s, transform .2s; display: inline-block; }
  .dig-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
  .dig-sub { font-size: 13.5px; color: var(--txt-2); max-width: 40ch; margin: 0 auto 20px; }
  .dig-btn { font-family: var(--fn); font-size: 15px; font-weight: 700; cursor: pointer; border: none;
    border-radius: 10px; padding: 14px 30px; background: var(--gold); color: var(--ink); transition: transform .08s, background .15s;
    box-shadow: 0 6px 24px rgba(212,168,67,.25); }
  .dig-btn:hover { background: var(--gold-b); }
  .dig-btn:active { transform: translateY(1px); }
  .dig-btn:disabled { background: var(--ink-3); color: var(--txt-3); cursor: not-allowed; box-shadow: none; }
  .dig-reward { font-family: var(--fm); font-size: 12px; color: var(--gold); margin-top: 14px; letter-spacing: .06em; }
  /* nugget burst */
  .nugget { position: absolute; font-size: 20px; pointer-events: none; opacity: 0;
    animation: pop 1s ease-out forwards; }
  @keyframes pop { 0% { opacity: 0; transform: translateY(0) scale(.4); } 20% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-90px) scale(1.1) rotate(20deg); } }

  /* wallet strip */
  .wallet-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); margin-bottom: 8px; }
  .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #7a2e2e; }
  .status-dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
  .addr { font-family: var(--fm); font-size: 12.5px; background: rgba(0,0,0,.35); padding: 6px 10px;
    border-radius: 6px; border: 1px solid var(--line); }
  .wbtns { display: flex; gap: 8px; margin-left: auto; }
  .wbtn { font-family: var(--fn); font-weight: 600; font-size: 13px; cursor: pointer; border-radius: 8px; padding: 9px 15px;
    border: 1px solid var(--gb); background: var(--gp); color: var(--gold-b); }
  .wbtn.mm { background: var(--gold); color: var(--ink); border-color: var(--gold); }
  .wbtn:disabled { opacity: .4; cursor: not-allowed; }
  .wbtn-disc { font-family: var(--fn); font-size: 11px; font-weight: 600; cursor: pointer;
    padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-2);
    background: transparent; color: var(--txt-3); transition: all .15s; }
  .wbtn-disc:hover { border-color: #7a2e2e; color: #d98; background: rgba(122,46,46,.1); }

  /* exchanges + fcfs */
  .exch { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 14px 0 6px; justify-content: center; }
  .exch .lbl { font-size: 12px; color: var(--txt-3); font-family: var(--fm); letter-spacing: .06em; }
  .chip { font-size: 12px; font-weight: 500; padding: 4px 11px; border: 1px solid var(--line); border-radius: 20px; color: var(--txt-2); }
  .fcfs { margin: 20px 0; }
  .fcfs-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--txt-2); margin-bottom: 6px; font-family: var(--fm); }
  .fcfs-track { height: 8px; background: var(--ink-3); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
  .fcfs-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-d), var(--gold)); border-radius: 20px; transition: width .5s; }

  /* modal (verify) */
  .modal-bg { position: fixed; inset: 0; background: rgba(6,7,12,.82); backdrop-filter: blur(4px); z-index: 100;
    display: none; align-items: center; justify-content: center; padding: 20px; }
  .modal-bg.on { display: flex; }
  .modal { background: var(--ink-2); border: 1px solid var(--gb); border-radius: 16px; max-width: 480px; width: 100%;
    max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 70px rgba(0,0,0,.6); }
  .modal-h { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
  .modal-h .t { font-size: 15px; font-weight: 700; }
  .modal-h .x { background: none; border: none; color: var(--txt-2); font-size: 20px; cursor: pointer; }
  .modal-b { padding: 22px; }
  .eligible-note { font-size: 12px; line-height: 1.55; color: var(--gold-b); background: rgba(212,168,67,.1); border: 1px solid rgba(212,168,67,.35); border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; }
  .modes { display: flex; gap: 8px; margin-bottom: 16px; }
  .mode { flex: 1; text-align: center; padding: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--line); border-radius: 8px; color: var(--txt-2); }
  .mode.active { border-color: var(--gb); color: var(--gold); background: var(--gp); }
  textarea { width: 100%; min-height: 90px; resize: vertical; font-family: var(--fm); font-size: 12.5px; padding: 11px;
    border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.35); color: var(--txt); }
  textarea:focus { outline: 1px solid var(--gold); }
  .hint { font-size: 12px; color: var(--txt-3); margin: 8px 0; line-height: 1.5; }
  .counter { font-size: 11px; color: var(--txt-3); text-align: right; margin-top: 4px; font-family: var(--fm); }
  .counter.over { color: #E06A5A; }
  .ghost-btn { width: 100%; font-family: var(--fn); font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 10px;
    border: 1px solid var(--gb); background: var(--gp); color: var(--gold-b); border-radius: 8px; padding: 10px; }
  .ghost-btn:disabled { opacity: .4; cursor: not-allowed; }
  .results { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
  .res-row { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line);
    border-radius: 8px; font-size: 12px; }
  .res-row.ok { border-left: 3px solid var(--green); }
  .res-row.no { border-left: 3px solid #7a2e2e; opacity: .7; }
  .res-row.used { border-left: 3px solid var(--gold); opacity: .85; }
  .res-used { color: var(--gold); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
  /* 이미 등록한 txid 리스트 (입력 화면) */
  #myTxids { margin: 4px 0 12px; }
  .mt-title { color: var(--gold); font-size: 12px; font-weight: 700; margin-bottom: 7px; }
  .mt-list { display: flex; flex-direction: column; gap: 6px; }
  .mt-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px;
    border: 1px solid var(--line); border-radius: 7px; background: rgba(212,168,67,.05);
    font-size: 11.5px; }
  .mt-tx { font-family: monospace; color: var(--txt-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-bnb { color: var(--txt-2); white-space: nowrap; }
  .mt-st { font-weight: 600; white-space: nowrap; padding: 1px 7px; border-radius: 20px; font-size: 10.5px; }
  .mt-confirmed { color: var(--green); background: rgba(31,168,106,.12); }
  .mt-pending { color: var(--gold); background: rgba(212,168,67,.12); }
  .res-tx { font-family: var(--fm); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .modal-summary { margin-top: 16px; padding: 14px; border-radius: 10px; background: var(--gp); border: 1px solid var(--gb);
    display: flex; justify-content: space-between; align-items: center; }
  .modal-summary .big { font-size: 22px; font-weight: 700; color: var(--gold); }
  .modal-summary .sub { font-size: 11.5px; color: var(--txt-2); }
  .toast { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; display: none; }
  .toast.show { display: block; }
  .toast.err { background: rgba(217,64,64,.1); color: #E88; border: 1px solid rgba(217,64,64,.3); }
  .toast.ok { background: rgba(31,168,106,.1); color: #6D9; border: 1px solid rgba(31,168,106,.3); }

  .links-sec { padding: 30px 0 10px; border-top: 1px solid var(--line); margin-top: 30px; }
  .links-title { font-size: 13px; font-family: var(--fm); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
  .links-sub { font-size: 12.5px; color: var(--txt-3); margin-bottom: 18px; }
  .link-group { margin-bottom: 16px; }
  .link-group-label { font-family: var(--fm); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--txt-2); margin-bottom: 9px; }
  .link-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .link-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
    font-size: 13px; font-weight: 600; color: var(--txt); border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 14px; background: var(--ink-2); transition: border-color .15s, transform .08s; }
  .link-chip:hover { border-color: var(--gb); transform: translateY(-1px); }
  .link-chip:active { transform: translateY(0); }
  .link-chip .lc-ico { font-size: 15px; }
  .link-chip .lc-img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
  .link-chip .lc-arrow { color: var(--txt-3); font-size: 12px; }
  .link-chip.partner { border-color: var(--line); background: linear-gradient(180deg, var(--ink-2), #0e100c); }
  .link-chip.partner .lc-tag { font-family: var(--fm); font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--gold); background: var(--gp); border: 1px solid var(--gb); border-radius: 20px; padding: 2px 7px; }

  .lore { padding: 30px 0 40px; border-top: 1px solid var(--line); margin-top: 30px; }
  .lore h3 { font-size: 13px; font-family: var(--fm); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
  .lore p { font-size: 13.5px; color: var(--txt-2); line-height: 1.7; }
  .trust { font-size: 11.5px; color: var(--txt-3); line-height: 1.6; padding-bottom: 40px; }

  /* DEXignation banner */
  .dexban { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: linear-gradient(90deg, #14100a, #1a1206);
    border-top: 1px solid var(--gb); }
  .dexban-in { max-width: 720px; margin: 0 auto; padding: 11px 22px; display: flex; align-items: center; gap: 12px; }
  .dexban-logo { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
  .dexban .tag { font-family: var(--fm); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    background: var(--gold); color: var(--ink); padding: 3px 7px; border-radius: 3px; white-space: nowrap; }
  .dexban .msg { font-size: 12.5px; flex: 1; min-width: 0; color: var(--txt-2); }
  .dexban .msg b { color: var(--gold); }
  .dexban a { font-size: 12px; font-weight: 700; color: var(--ink); background: var(--gold); padding: 6px 12px; border-radius: 6px; text-decoration: none; white-space: nowrap; }
  .dexban .x { background: none; border: none; color: var(--txt-2); font-size: 17px; cursor: pointer; }

  body { padding-bottom: 70px; }
  @media (max-width: 560px) {
    .seals { grid-template-columns: 1fr; }
    .dexban .tag { display: none; }
  }
  /* ── 후원 ─────────────────────────────────────────── */
.donate{
  margin: 32px 0 8px;
  padding: 18px 20px;
  border: 1px solid rgba(200,168,75,.18);
  border-radius: 10px;
  background: rgba(200,168,75,.04);
}
.donate-head{
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold, #c8a84b); margin-bottom: 14px;
}
.donate-heart{ font-size: 14px; }

.donate-row{
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  padding: 10px 12px;
}
.donate-tag{
  flex: none;
  font-size: 11px; letter-spacing: 1px;
  color: rgba(255,255,255,.4);
  min-width: 34px;
}
.donate-addr{
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  word-break: break-all;   /* 모바일에서 주소가 넘치지 않게 */
  line-height: 1.4;
}
.donate-copy{
  flex: none;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: rgba(255,255,255,.4); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.donate-copy:hover{
  color: var(--gold, #c8a84b);
  border-color: rgba(200,168,75,.3);
  background: rgba(200,168,75,.07);
}
.donate-copy.done{ color: #3fb950; }
.donate-copy svg{ width: 15px; height: 15px; }

.donate-note{
  margin-top: 10px; font-size: 12px;
  color: rgba(255,255,255,.42);
}
.donate-warn{
  margin-top: 6px; font-size: 11px; line-height: 1.5;
  color: rgba(210,153,34,.75);
}

@media (max-width: 480px){
  .donate{ padding: 14px 14px; }
  .donate-addr{ font-size: 11px; }
}
/* ── 체인 불일치 경고 배너 ─────────────────────────────
   지갑이 다른 네트워크에 있을 때만 표시된다.
   claim 을 눌러야 알 수 있으면 늦으므로 상시 감시해 알린다. */
.chain-warn{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin:12px 0;
  padding:12px 16px;
  border:1px solid rgba(210,153,34,.35);
  border-radius:10px;
  background:rgba(210,153,34,.08);
  font-size:13px;
  color:#d29922;
}
.chain-warn .cw-ico{ flex:none; font-size:15px; }
.chain-warn .cw-msg{ flex:1; min-width:180px; line-height:1.45; }
.chain-warn .cw-btn{
  flex:none;
  font-family:inherit; font-weight:700; font-size:12.5px;
  cursor:pointer; border:none; border-radius:6px;
  padding:8px 14px;
  background:#d29922; color:#1a1a1a;
  transition:filter .15s;
}
.chain-warn .cw-btn:hover{ filter:brightness(1.1); }

@media (max-width:480px){
  .chain-warn{ padding:10px 12px; font-size:12px; }
  .chain-warn .cw-btn{ width:100%; }
}
/* ── 체인 불일치 경고 배너 ─────────────────────────────
   지갑이 다른 네트워크에 있을 때만 표시된다.
   claim 을 눌러야 알 수 있으면 늦으므로 상시 감시해 알린다. */
.chain-warn{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin:12px 0;
  padding:12px 16px;
  border:1px solid rgba(210,153,34,.35);
  border-radius:10px;
  background:rgba(210,153,34,.08);
  font-size:13px;
  color:#d29922;
}
.chain-warn .cw-ico{ flex:none; font-size:15px; }
.chain-warn .cw-msg{ flex:1; min-width:180px; line-height:1.45; }
.chain-warn .cw-btn{
  flex:none;
  font-family:inherit; font-weight:700; font-size:12.5px;
  cursor:pointer; border:none; border-radius:6px;
  padding:8px 14px;
  background:#d29922; color:#1a1a1a;
  transition:filter .15s;
}
.chain-warn .cw-btn:hover{ filter:brightness(1.1); }

@media (max-width:480px){
  .chain-warn{ padding:10px 12px; font-size:12px; }
  .chain-warn .cw-btn{ width:100%; }
}

/* ── 검증 실패 사유 ─────────────────────────────────
   "유효한 입금이 없습니다" 만 뜨면 사용자가 이유를 모른다.
   행마다 사유를 붙여 문의를 줄인다. */
.res-row .res-why{
  flex:1;
  min-width:0;
  text-align:right;
  margin-right:8px;
  font-size:11.5px;
  color:#d29922;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.res-row.no .res-tx{ opacity:.6 }

@media (max-width:480px){
  .res-row{ flex-wrap:wrap }
  .res-row .res-why{
    flex:0 0 100%;
    text-align:left;
    margin:4px 0 0 0;
    white-space:normal;
  }
}