@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,900&family=Sora:wght@400;500;600;700;800&display=swap");

:root {
  --parch: #f1e7ca;
  --parch2: #e7d7ac;
  --parch-edge: #d8c290;
  --ink: #33240f;
  --ink2: #54401f;
  --muted: #7a5f37;
  --wood: #7a4f2a;
  --wood-d: #5a3a1e;
  --wood-dd: #3f2812;
  --wood-l: #9c6a3c;
  --wood-ll: #c08a4e;
  --green: #3f7d34;
  --green-l: #5aa03f;
  --green-d: #2c5a24;
  --red: #b23a25;
  --red-d: #8a2a18;
  --amber: #c98a2b;
  --gold: #caa24b;
  --pixel: "Press Start 2P", monospace;
  --display: "Fraunces", Georgia, serif;
  --body: "Sora", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body, html { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(180deg, #8fc9ea, #a9d6b0 240px, #3a6a30 560px, #24451f 1100px, #1d3a19) fixed;
  min-height: 100vh;
}
body:before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 240px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side,#fff 92%,transparent) 12% 40px/70px 26px no-repeat,
              radial-gradient(closest-side,#fff 92%,transparent) 30% 80px/50px 20px no-repeat,
              radial-gradient(closest-side,#fff 92%,transparent) 68% 50px/90px 30px no-repeat,
              radial-gradient(closest-side,#fff 92%,transparent) 88% 90px/60px 22px no-repeat;
  opacity: .8;
}
a { color: var(--green-d); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
img { max-width: 100%; }
code { word-break: break-all; }
.coincard, .frame, .panel, .ptcard { min-width: 0; }
.px { font-family: var(--pixel); }

.plank {
  position: relative;
  background: repeating-linear-gradient(90deg,rgba(0,0,0,.05) 0 3px,transparent 3px 7px),repeating-linear-gradient(0deg,hsla(0,0%,100%,.04) 0 1px,transparent 1px 6px),linear-gradient(180deg,var(--wood-l),var(--wood-d));
  border-top: 3px solid var(--wood-ll);
  border-bottom: 5px solid var(--wood-dd);
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.28),0 3px 0 rgba(0,0,0,.25);
}
.hdr { z-index: 3; }
.hdr-in { display: grid; grid-template-columns: 1fr auto 1fr; padding: 14px 20px; grid-gap: 14px; gap: 14px; max-width: 1240px; margin: 0 auto; align-items: center; }
.hstats { display: flex; gap: 22px; justify-self: end; align-items: center; }
.hstat { text-align: center; line-height: 1.05; }
.hstat b { display: block; font-family: var(--display); font-weight: 900; font-size: 21px; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.hstat span { font-family: var(--body); font-weight: 700; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #ecdcb8; }

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-img { height: 46px; width: auto; display: block; filter: drop-shadow(0 0 2px rgba(255,255,255,.95)) drop-shadow(0 0 5px rgba(255,255,255,.6)) drop-shadow(1px 2px 0 rgba(0,0,0,.4)); }

.nav { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.nav a {
  font-family: var(--body); font-weight: 800; font-size: 14px; color: #f8eccf; text-decoration: none;
  text-shadow: 0 1px 1px rgba(0,0,0,.35); padding: 9px 15px; border: 2px solid var(--wood-dd); border-radius: 8px;
  background: linear-gradient(180deg,var(--wood),var(--wood-d)); box-shadow: inset 0 2px 0 hsla(0,0%,100%,.15),0 3px 0 var(--wood-dd); transition: transform .1s;
}
.nav a:hover { transform: translateY(-2px); color: #fff; }
.nav a.on {
  background: linear-gradient(180deg,#f4c94e,#cf9a24); color: #3a2a08; text-shadow: none; border-color: #8a6410;
  box-shadow: inset 0 2px 0 hsla(0,0%,100%,.4),0 3px 0 #8a6410;
}

.frame {
  position: relative; margin: 24px 0;
  background: radial-gradient(circle at 18% 22%,rgba(0,0,0,.03),transparent 42%),radial-gradient(circle at 82% 78%,rgba(90,60,20,.05),transparent 46%),repeating-linear-gradient(0deg,rgba(120,90,40,.025) 0 2px,transparent 2px 4px),var(--parch);
  border: 13px solid transparent; border-radius: 16px; background-clip: padding-box;
  box-shadow: 0 0 0 3px var(--wood-dd),0 10px 0 rgba(0,0,0,.25),0 16px 34px rgba(0,0,0,.4);
  outline: 4px solid var(--wood); outline-offset: -13px;
}
.frame:after {
  content: ""; position: absolute; inset: -13px; border-radius: 16px; z-index: -1;
  background: repeating-linear-gradient(90deg,rgba(0,0,0,.1) 0 4px,transparent 4px 9px),linear-gradient(180deg,var(--wood-l),var(--wood-d));
}
.frame>.bolt {
  position: absolute; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,#e7c37e,#6b4a22 70%);
  box-shadow: 0 1px 0 rgba(0,0,0,.5); z-index: 2;
}
.frame>.bolt.tl { top: -7px; left: -7px; }
.frame>.bolt.tr { top: -7px; right: -7px; }
.frame>.bolt.bl { bottom: -7px; left: -7px; }
.frame>.bolt.br { bottom: -7px; right: -7px; }

.frame-in { padding: 26px 30px; }
.dots { border: 0; border-top: 3px dotted var(--muted); opacity: .45; margin: 16px 0; }

h1.title { font-family: var(--display); font-weight: 900; font-size: clamp(30px,5vw,52px); line-height: 1.05; color: var(--ink); letter-spacing: -.5px; margin: 0 0 14px; }
h1.title .g { color: var(--green-d); }
h1.title .r { color: var(--red-d); }
h2.sec { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--ink); margin: 0 0 8px; letter-spacing: -.3px; }
.eyebrow { font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: 2px; color: var(--green-d); text-transform: uppercase; margin-bottom: 10px; }
.lead { font-size: 18px; color: var(--ink2); max-width: 660px; line-height: 1.6; }

.btn {
  font-family: var(--body); font-weight: 800; font-size: 15px; letter-spacing: .3px; color: #fff; cursor: pointer;
  padding: 14px 24px; border: 3px solid var(--wood-dd); border-radius: 9px; text-transform: uppercase;
  background: linear-gradient(180deg,var(--green-l),var(--green-d));
  box-shadow: inset 0 2px 0 hsla(0,0%,100%,.25),0 4px 0 var(--wood-dd); transition: transform .08s;
  display: inline-block; text-align: center; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 hsla(0,0%,100%,.25),0 1px 0 var(--wood-dd); }
.btn.wood { background: linear-gradient(180deg,var(--wood-l),var(--wood-d)); }
.btn.red { background: linear-gradient(180deg,#cf4a33,var(--red-d)); }
.btn.sm { font-size: 12px; padding: 9px 14px; }

.field {
  font-family: var(--body); font-size: 16px; color: var(--ink); padding: 15px 17px;
  border: 3px solid var(--wood-d); border-radius: 9px; background: #fbf5df; outline: none;
  box-shadow: inset 0 2px 5px rgba(90,60,20,.18); width: 100%;
}
.field:focus { border-color: var(--green); box-shadow: inset 0 2px 5px rgba(90,60,20,.18),0 0 0 3px rgba(90,160,63,.35); }

.chainbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.chainpill {
  display: flex; align-items: center; gap: 8px; font-family: var(--body); font-weight: 700; font-size: 14px;
  cursor: pointer; padding: 8px 14px; border: 3px solid var(--wood-d); border-radius: 999px; background: #f3ead0;
  color: var(--ink); transition: transform .1s; text-decoration: none;
}
.chainpill:hover { transform: translateY(-1px); }
.chainpill.on { background: linear-gradient(180deg,#fff8e6,#efe0b8); box-shadow: inset 0 0 0 2px var(--green-d),0 3px 0 var(--wood-dd); }
.chainpill .dot { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: #fff; font-weight: 800; }

.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); grid-gap: 16px; gap: 16px; }
.coincard {
  background: linear-gradient(180deg,#fbf3d9,#efe2bd); border: 3px solid var(--wood-d); border-radius: 14px;
  padding: 15px; box-shadow: 0 4px 0 var(--wood-dd),0 8px 16px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 11px; transition: transform .1s;
}
.coincard:hover { transform: translateY(-3px); }
.coincard .top { display: flex; align-items: center; gap: 11px; }
.coincard .sym { font-family: var(--display); font-weight: 900; font-size: 19px; color: var(--ink); line-height: 1; }
.coincard .age { font-size: 13px; color: var(--muted); margin-top: 3px; }
.coincard .stats { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink2); }
.coincard .stats b { color: var(--ink); font-weight: 700; }

.cicon { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.cicon .img, .cicon .letter { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--wood-d); }
.cicon .img { object-fit: cover; background: #fff; display: block; }
.cicon .letter { display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 20px; color: #fff; background: var(--wood-l); }

.flag { font-family: var(--body); font-weight: 800; font-size: 11px; letter-spacing: .5px; padding: 4px 9px; border-radius: 6px; color: #fff; text-transform: uppercase; border: 2px solid rgba(0,0,0,.28); margin-left: auto; }
.flag.safe { background: var(--green-d); }
.flag.warn { background: #a6741d; }
.flag.danger { background: var(--red-d); }

.main-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; grid-gap: 22px; gap: 22px; align-items: start; margin: 24px 0; }
.side { position: sticky; top: 16px; }
.panel { background: var(--parch); border: 3px solid var(--wood-d); border-radius: 12px; padding: 16px 18px; box-shadow: 0 4px 0 var(--wood-dd),0 8px 16px rgba(0,0,0,.2); margin-bottom: 16px; }
.panel h3 { font-family: var(--display); font-weight: 800; font-size: 17px; margin: 0 0 10px; color: var(--ink); }
.adslot { min-height: 250px; display: grid; place-items: center; background: repeating-linear-gradient(45deg,#e7d7ac 0 10px,#ddcc9e 10px 20px); border: 3px dashed var(--wood-d); border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 14px; text-align: center; }

.ftr { margin-top: 44px; z-index: 2; position: relative; }
.ftr:before {
  content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; pointer-events: none; z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='16' viewBox='0 0 56 16'%3E%3Cpath d='M0 16 L3 6 L6 16 L9 2 L12 16 L15 7 L18 16 L21 3 L24 16 L27 6 L30 16 L33 1 L36 16 L39 7 L42 16 L45 3 L48 16 L51 6 L54 16 L56 9 L56 16 Z' fill='%234e9b3f'/%3E%3Cpath d='M0 16 L2 9 L4 16 L7 5 L10 16 L13 9 L16 16 L19 6 L22 16 L25 9 L28 16 L31 4 L34 16 L37 9 L40 16 L43 6 L46 16 L49 9 L52 16 L55 7 L56 16 Z' fill='%233f8a31' opacity='.85'/%3E%3C/svg%3E") repeat-x bottom/56px 16px;
}
.ftr-in { padding: 24px 20px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; max-width: 1240px; margin: 0 auto; }
.ftr-brand { max-width: 250px; }
.ftr-brand p { font-family: var(--body); font-weight: 500; font-size: 14px; color: #ecdcb8; margin: 11px 0 0; line-height: 1.55; }
.ftr .cols { display: flex; gap: 38px; flex-wrap: wrap; }
.ftr .col b { font-family: var(--display); font-weight: 900; color: #fbeecb; margin-bottom: 9px; text-shadow: 0 1px 2px rgba(0,0,0,.35); display: block; }
.ftr .col a { font-family: var(--body); font-weight: 700; color: #e8d3ab; text-decoration: none; padding: 3px 0; display: block; font-size: 15px; }
.ftr .col a:hover { color: #fff; }
.ftr .sign { text-align: right; }
.ftr .sign .nm { font-family: var(--pixel); font-size: 11px; color: #f3e2bd; margin-top: 8px; }
.ftr .sign .au { font-family: var(--body); font-weight: 700; font-size: 12px; letter-spacing: 1px; color: #cdb684; margin-top: 4px; }
.ftr .copy { font-family: var(--body); font-weight: 600; font-size: 13px; color: #cdb684; margin-top: 6px; }

.barcode { height: 44px; width: 100%; max-width: 260px; background: repeating-linear-gradient(90deg,#2a1c0e 0 2px,transparent 2px 4px,#2a1c0e 4px 7px,transparent 7px 9px,#2a1c0e 9px 13px,transparent 13px 16px); }
.disc { background: rgba(40,28,14,.5); border: 3px solid var(--wood-dd); border-radius: 9px; padding: 15px 18px; color: #e8d9b8; font-size: 14.5px; margin-top: 18px; line-height: 1.6; }
.disc b { color: #f3e2bd; font-family: var(--display); font-weight: 800; font-size: 15px; }

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .hdr-in { display: flex; justify-content: space-between; }
  .hstats { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 12px; }
  .hdr-in { display: flex; flex-direction: column; text-align: center; gap: 10px; padding: 12px 14px; }
  .hdr-in, .logo { justify-content: center; }
  .logo-img { height: 42px; }
  .nav { justify-content: center; gap: 6px; }
  .nav a { font-size: 12px; padding: 8px 11px; }
  .frame { border-width: 8px; border-radius: 13px; outline-width: 3px; outline-offset: -8px; margin: 16px 0; }
  .frame:after { inset: -8px; border-radius: 13px; }
  .frame>.bolt { width: 10px; height: 10px; }
  .frame>.bolt.tl { top: -5px; left: -5px; }
  .frame>.bolt.tr { top: -5px; right: -5px; }
  .frame>.bolt.bl { bottom: -5px; left: -5px; }
  .frame>.bolt.br { bottom: -5px; right: -5px; }
  .frame-in { padding: 16px 14px; }
  h1.title { font-size: clamp(24px,7vw,34px); }
  h2.sec { font-size: 20px; }
  .lead { font-size: 16px; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .coincard { padding: 12px; border-radius: 13px; gap: 9px; }
  .ftr-in { padding: 20px 14px; }
  .ftr .cols { gap: 24px; }
  .disc { padding: 13px 14px; font-size: 13.5px; }
}
