/* Hoard app layer: vault-door welcome, stock picker, holdings, quiet gold accents. */
.app-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 85% -10%, rgba(244,169,187,.09), transparent 60%), radial-gradient(700px 500px at -10% 110%, rgba(244,169,187,.05), transparent 60%), var(--bg); }
.side .brand { font: 500 26px/1 var(--display); }
.vhead h1, .welcome h1 { font: 400 clamp(40px, 5vw, 60px)/1 var(--display); letter-spacing: -.01em; }
.vhead h1 em { font-style: italic; color: var(--acc); }
.stats b { font: 500 26px var(--display); }
.panel { border-radius: 18px; overflow: hidden; }
.panel > header h2 { color: var(--fg); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.acc { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.pill { font: 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--mute); }
.pill.on { color: var(--acc); border-color: rgba(244,169,187,.5); }
.tag { font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line); padding: 4px 8px; border-radius: 999px; }
.link { color: var(--acc); font: 12px var(--mono); }

.welcome { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 30px; border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(135deg, rgba(244,169,187,.08), rgba(34,17,26,.6) 45%); }
.welcome p { color: var(--mute); max-width: 56ch; margin-top: 10px; }
.vault-mini { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #23232b, #0e0e13 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 20px 50px -20px rgba(244,169,187,.35); animation: turn 24s linear infinite; }
.vault-mini svg { width: 76px; height: 76px; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vault-mini { animation: none; } }

.lg { border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.list .item { display: flex; align-items: center; gap: 14px; }
.list .item .grow { flex: 1; min-width: 0; display: grid; gap: 3px; }
.list .item .grow small { color: var(--mute); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out { display: flex; gap: 10px; align-items: center; padding: 0 16px 16px 68px; flex-wrap: wrap; }
.out[hidden] { display: none; }
.out .field { flex: 1; min-width: 220px; }

.picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pk { display: grid; justify-items: start; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(23,10,15,.5); color: var(--fg); cursor: pointer; text-align: left;
  transition: border-color .5s cubic-bezier(.32,.72,0,1), background .5s cubic-bezier(.32,.72,0,1), transform .4s cubic-bezier(.32,.72,0,1); }
.pk img { width: 30px; height: 30px; border-radius: 50%; background: #fff; margin-bottom: 4px; }
.pk b { font: 500 13px var(--mono); }
.pk small { color: var(--mute); font-size: 11.5px; }
.pk:hover { border-color: var(--line-2); transform: translateY(-1px); }
.pk:active { transform: scale(.98); }
.pk[aria-pressed="true"] { border-color: var(--acc); background: linear-gradient(160deg, rgba(244,169,187,.14), rgba(23,10,15,.5) 70%); }
.quote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--mute); font-size: 14px; }
.quote b { color: var(--fg); }
.quote em { font: normal 10.5px var(--mono); letter-spacing: .06em; color: var(--acc); margin-left: auto; }
.quote img { width: 22px; height: 22px; border-radius: 50%; background: #fff; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--acc); animation: turn .8s linear infinite; }

.holdings { display: grid; }
.hold { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.hold:last-child { border-bottom: 0; }
.hold b { font: 700 24px var(--display); }
.hold small { display: block; color: var(--mute); font-size: 12.5px; }
.hold .addrs { font: 10.5px var(--mono); letter-spacing: .08em; color: var(--acc); text-transform: uppercase; }
body[data-app-mode="live"] .seg button[data-mode="live"][aria-pressed="true"] { background: var(--acc); color: var(--acc-ink); }

@media (max-width: 1000px) { .picks { grid-template-columns: repeat(3, 1fr); } .welcome { grid-template-columns: 1fr; } .vault-mini { width: 80px; height: 80px; } }
@media (max-width: 600px) { .picks { grid-template-columns: repeat(2, 1fr); } .out { padding-left: 16px; } }

/* ---------- polish pass v2 ---------- */
.btn { border-radius: 999px; transition: transform .4s cubic-bezier(.32,.72,0,1), background .3s, border-color .3s; }
.side .btn { border-radius: 14px; box-shadow: 0 14px 30px -14px rgba(244,169,187,.55); }
.side .btn:hover { background: #f7bfcc; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(34,17,26,.7); }
.seg button { border: 0; background: none; color: var(--mute); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; transition: background .3s, color .3s; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(23,10,15,.78); backdrop-filter: blur(12px); }
.panel { box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 30px 60px -40px rgba(0,0,0,.9); }
.panel > header { background: linear-gradient(180deg, rgba(255,255,255,.025), transparent); }
.field, select.field, .f select { border-radius: 12px; }
.vhead h1 { letter-spacing: .005em; }
.list .item { padding: 14px 16px; transition: background .3s; }
.list .item:hover { background: rgba(255,255,255,.02); }
@media (max-width: 760px) {
  .topbar { padding: 10px 16px; }
  .crumb { display: none; }
  .topbar .right { width: 100%; justify-content: space-between; gap: 8px; }
  #keys-pill { display: none; }
  #connect { padding: 8px 14px; font-size: 13px; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; height: auto; position: static; gap: 10px; padding: 12px 16px; }
  .side nav { display: flex; overflow-x: auto; width: 100%; gap: 4px; }
  .side nav a { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 12px; white-space: nowrap; }
  .side nav a[aria-current="page"] { border-bottom-color: var(--acc); }
  .side .btn { margin-left: auto; padding: 9px 16px; }
  .side .foot { display: none; }
  .view { padding: 20px 16px; }
}
@media (max-width: 760px) {
  .side nav a, .side nav a[aria-current="page"] { border-left: 0 !important; }
  .picks { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .pk { padding: 10px; }
  .pk small { display: none; }
}

/* live price tiles: own colour per stock, gold frame, sparkline of the last 8 Chainlink rounds */
.panel.live { margin: 18px 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 16px; }
.tiles .empty { grid-column: 1 / -1; }
.tile { position: relative; display: grid; gap: 6px; padding: 16px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 10%, transparent), rgba(34,17,26,.7) 55%);
  transition: border-color .4s cubic-bezier(.32,.72,0,1), transform .5s cubic-bezier(.32,.72,0,1); }
.tile:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-2px); }
.tile .h { display: flex; align-items: center; gap: 10px; }
.tile .emb { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent); flex: none; }
.tile .emb img { width: 100%; height: 100%; display: block; }
.tile .who { display: grid; line-height: 1.15; }
.tile .who b { font: 700 18px var(--display); letter-spacing: .03em; }
.tile .who small { color: var(--mute); font-size: 12px; }
.tile .p { font: 800 30px/1 var(--display); margin-top: 6px; }
.tile .sector { font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.tile svg { width: 100%; height: 34px; display: block; }
.tile .c { display: flex; justify-content: space-between; align-items: center; font: 12px var(--mono); color: var(--mute); }
.tile .c .up { color: var(--ok, #7fd18b); } .tile .c .down { color: var(--bad, #ff7a6e); }


/* ---------- send ---------- */
.send-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr); gap: 22px; align-items: start; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.row2 { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.row2 label { flex: 1; min-width: 180px; }
.quick { display: flex; gap: 6px; }
.quick button { padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg); font: 500 13px var(--mono); cursor: pointer; transition: border-color .4s var(--spring), color .4s var(--spring); }
.quick button:hover { border-color: var(--acc); color: var(--acc); }
textarea.field { resize: vertical; font-family: var(--body); }
.fine { color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.preview { display: grid; gap: 18px; position: sticky; top: 20px; }
.card-gift { --paper: #5c1626; --paper2: #320c16; --ribbon: #f4a9bb; --knot: #e6c27a; position: relative; display: grid; justify-items: center; gap: 12px; padding: 30px 26px 22px; border-radius: 22px; text-align: center; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--paper) 85%, #fff), var(--paper) 45%, var(--paper2)); transition: background .6s var(--spring); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 40px 80px -40px rgba(0,0,0,.9); }
.card-gift::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 26px; transform: translateX(-50%); background: linear-gradient(90deg, color-mix(in srgb, var(--ribbon) 82%, #000), color-mix(in srgb, var(--ribbon) 70%, #fff) 45%, color-mix(in srgb, var(--ribbon) 82%, #000)); opacity: .95; }
.card-gift > * { position: relative; }
.cg-top { display: flex; align-items: center; gap: 8px; font: 10.5px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: #f8d9e1; background: rgba(43,13,22,.75); padding: 6px 12px; border-radius: 999px; }
.cg-top svg { width: 18px; height: 18px; }
#cg-logo { width: 72px; height: 72px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--knot), 0 0 40px rgba(230,194,122,.4); margin-top: 8px; }
#cg-amt { font: 500 30px var(--display); color: var(--fg); background: rgba(43,13,22,.7); padding: 2px 14px; border-radius: 10px; }
#cg-note { max-width: 300px; padding: 12px 16px; background: #f6ede4; color: #3a1a22; font: italic 400 17px/1.35 var(--display); border-radius: 4px; transform: rotate(-1deg); box-shadow: 0 18px 30px -18px rgba(0,0,0,.8); }
.cg-foot { font: 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(246,237,228,.6); background: rgba(43,13,22,.7); padding: 4px 10px; border-radius: 999px; }
.link-out .link-box { padding: 0 16px; }
.link-out code { display: block; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px dashed rgba(244,169,187,.45); font-size: 12px; word-break: break-all; color: var(--acc); }
.link-out .bar { padding: 14px 16px 0; flex-wrap: wrap; }
.warn { padding: 12px 16px 16px; color: var(--mute); font-size: 13px; line-height: 1.5; }
.gift-row { flex-wrap: wrap; }
.tag.on { color: var(--acc); border-color: rgba(244,169,187,.5); }
.view .panel > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 980px) { .send-grid { grid-template-columns: 1fr; } .preview { position: static; } }
.wrap-form .f { display: grid; gap: 18px; padding: 18px; }
.wrap-form label { display: grid; gap: 8px; font-size: 13.5px; color: var(--mute); }
.wrap-form label small { font: 10.5px var(--mono); letter-spacing: .06em; color: var(--dim); }
.wrap-form textarea.field { min-height: 0; height: 74px; }
.wrap-form .bar { display: flex; align-items: center; gap: 14px; }

.wraps { display: flex; flex-wrap: wrap; gap: 8px; }
.wraps button { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 7px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg); font: 500 13px var(--body); cursor: pointer;
  transition: border-color .4s var(--spring), background .4s var(--spring); }
.wraps i { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(90deg, transparent 40%, var(--r) 40% 60%, transparent 60%), var(--p); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); position: relative; }
.wraps i::after { content: ""; position: absolute; left: 50%; top: -3px; width: 8px; height: 8px; border-radius: 50%; translate: -50% 0; background: var(--k); }
.wraps button[aria-pressed="true"] { border-color: var(--acc); background: rgba(244,169,187,.1); }
