/* YAAD Wallet: Apple Wallet-style deck, card view, add flow and details sheet */
:root { --card-h: 214px; --peek: 62px; --spring: cubic-bezier(.2, .9, .25, 1); }
body.wl { background: #070605; }
.wl .wrap { max-width: 460px; padding-top: 14px; }
.wl-top { display: flex; justify-content: space-between; align-items: center; margin: 6px 2px 16px; }
.wl-top h1 { font: 700 34px/1 system-ui, -apple-system, "Segoe UI", sans-serif; margin: 0; letter-spacing: -.02em; }
.circle { width: 38px; height: 38px; border-radius: 50%; padding: 0; display: inline-grid; place-items: center; font-size: 22px; line-height: 1; }
.circle.ghost { background: #1e1912; color: var(--text); border: 0; }

/* deck */
.deck { position: relative; }
.card { position: relative; height: var(--card-h); border-radius: 16px; padding: 14px 16px; color: #fff8e6; cursor: pointer; overflow: hidden;
  box-shadow: 0 -1px 0 rgba(255,255,255,.12) inset, 0 12px 30px rgba(0,0,0,.6); margin-top: calc(var(--peek) - var(--card-h));
  transition: transform .35s cubic-bezier(.2,.8,.2,1), margin .35s cubic-bezier(.2,.8,.2,1), opacity .3s; display: flex; flex-direction: column; }
.card:first-child { margin-top: 0; }
.card:hover { transform: translateY(-4px); }
.card:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.card .r1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-height: 34px; }
.card .logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; min-width: 0; }
.card .logo img { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.card .logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fld { display: grid; gap: 2px; text-align: right; }
.fld .k { font: 600 9.5px/1 system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.fld .v { font: 600 14px/1.2 system-ui, sans-serif; }
.card .primary { margin-top: 18px; }
.card .primary .v { font: 700 24px/1.1 system-ui, sans-serif; text-align: left; letter-spacing: -.01em; }
.card .primary .k { text-align: left; }
.card .r3 { display: flex; gap: 22px; margin-top: auto; align-items: flex-end; }
.card .r3 .fld { text-align: left; }
.card .qr { margin-left: auto; background: #fff; border-radius: 6px; padding: 5px; line-height: 0; }
.card .qr svg { width: 58px; height: 58px; }
.card .shine { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.14), transparent 38%); pointer-events: none; }

/* card view: selected card on top, the rest as a small deck at the bottom */
.wl.sel .deck .card { display: none; }
.wl.sel .deck .card.chosen { display: flex; margin-top: 0; transform: none; cursor: default; }
.below { display: none; }
.wl.sel .below { display: block; }
.actions { display: flex; gap: 10px; margin: 14px 0 6px; }
.actions button, .actions a button { flex: 1; }
.actions a { flex: 1; display: flex; }
.act { background: #1e1912; color: var(--text); border-radius: 12px; padding: 11px 8px; font-weight: 600; font-size: 14px; }
.list h3 { font: 700 20px/1 system-ui, sans-serif; margin: 22px 2px 10px; }
.item { display: flex; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid #221c13; cursor: pointer; }
.item:last-child { border-bottom: 0; }
.item .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; flex: none; }
.item .mid { flex: 1; min-width: 0; }
.item .mid b { display: block; font-size: 15px; }
.item .mid span { font-size: 12.5px; color: var(--muted); }
.item .rt { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.item .rt b { display: block; color: var(--text); font-size: 14px; }
.item .more { display: none; width: 100%; }
.item.open { flex-wrap: wrap; }
.item.open .more { display: block; }
.minideck { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(460px, 100%); padding: 0 16px; z-index: 5; display: none; }
.wl.sel .minideck { display: block; }
.minideck .mc { height: 30px; border-radius: 14px 14px 0 0; margin-top: -14px; box-shadow: 0 -6px 16px rgba(0,0,0,.5); cursor: pointer; }
.minideck .mc:first-child { margin-top: 0; }
.spacer { height: 90px; }

/* sheets (add flow, details) */
.scrim { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; opacity: 0;
  background: rgba(0, 0, 0, calc(.55 * var(--dim, 1))); transition: opacity .3s ease, visibility 0s linear .5s; }
.scrim.on { visibility: visible; opacity: 1; transition: opacity .3s ease; }
body:has(.scrim.on) { overflow: hidden; }
.sheet2 { width: min(480px, 100%); max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: #15110b; border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(26px + env(safe-area-inset-bottom)); border: 1px solid #2c2418; border-bottom: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .45); }
.scrim .sheet2 { transform: translateY(105%); transition: transform .5s var(--spring); will-change: transform; }
.scrim.on .sheet2 { transform: none; }
@media (min-width: 900px) {
  .scrim { align-items: center; }
  .scrim .sheet2 { border-radius: 22px; border-bottom: 1px solid #2c2418; opacity: 0; transform: translateY(18px) scale(.97); transition: transform .45s var(--spring), opacity .22s ease; }
  .scrim.on .sheet2 { opacity: 1; transform: none; }
}
.grab { width: 40px; height: 5px; border-radius: 3px; background: #3a3020; margin: 0 auto 12px; }
.sh-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 6px; }
.sh-top > :first-child { justify-self: start; } .sh-top > :last-child { justify-self: end; } .sh-top > b { font-size: 17px; text-align: center; }
.sh-top button { background: transparent; color: var(--gold); padding: 6px 0; font-weight: 600; }
.sheet2 h2 { font: 700 24px/1.15 system-ui, sans-serif; margin: 8px 0 6px; text-wrap: balance; }
.sheet2 .sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { border-radius: 14px; padding: 13px; background: #1e1912; border: 1.5px solid transparent; cursor: pointer; display: grid; gap: 5px; }
.tile .ti { font-size: 20px; }
.tile b { font-size: 14px; } .tile span { font-size: 12px; color: var(--muted); }
.tile.on { border-color: var(--gold); background: #2a2010; }
.tile.lock { opacity: .65; cursor: default; }
.tile:focus-visible { outline: 2px solid var(--gold); }
.cta { width: 100%; padding: 15px; font-size: 17px; border-radius: 14px; margin-top: 18px; }
.steps2 { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.steps2 li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.steps2 .d { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #2c2418; color: var(--muted); }
.steps2 .d { padding: 0; margin: 0; border: 0; box-shadow: none; cursor: default; }
.steps2 .d.pass { background: #2f7a48; color: #fff; } .steps2 .d.fail { background: #a8392c; color: #fff; }
.steps2 .d.pending { background: #6a5420; color: #fff; animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: .55; } to { opacity: 1; } }
.steps2 small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.preview { transform: scale(.92); transform-origin: top center; margin: 0 0 4px; }
.preview .card { margin-top: 0; cursor: default; }
.seg2 { display: flex; background: #1e1912; border-radius: 10px; padding: 3px; gap: 3px; margin: 6px 0 14px; overflow-x: auto; }
.seg2 button { flex: 1; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; padding: 7px 8px; border-radius: 8px; white-space: nowrap; }
.seg2 button.on { background: #3a2e1a; color: var(--text); }
.kvs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13.5px; }
.kvs dt { color: var(--muted); } .kvs dd { margin: 0; overflow-wrap: anywhere; }
.drop2 { display: block; border: 1.5px dashed #3a3020; border-radius: 14px; padding: 16px; text-align: center; color: var(--muted); cursor: pointer; margin-bottom: 10px; }
.drop2.has { border-color: var(--gold); color: var(--gold-hi); }
@media (prefers-reduced-motion: reduce) { .card, .sheet2, .scrim .sheet2 { transition: none; animation: none; } .card:hover { transform: none; } }
