:root {
  --gold: #c9a35a; --gold-bright: #e9d08a; --frame: #1c1713; --frame-hi: #2a221a;
  --trim: #7a5c2a; --trim-dark: #2b2014; --parchment: #e8d7b0; --parchment-edge: #c9b78e;
  --ink: #2a2015; --ink-soft: #6a5438; --cream: #efe2bd; --muted: #cbb78f;
  --red: #8a2d1c; --red-dark: #5a1a10; --uncommon: #1eff00;
  --q-common: #ffffff; --q-gold: #ffd100; --q-grey: #9d9d9d;
  --gutter: 16px;
  --serif: "Crimson Pro", Georgia, serif;
  --display: Cinzel, Georgia, serif;
  --type: "Special Elite", "Courier New", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #0f0d0b; color: var(--parchment); font: 17px/1.5 var(--serif); }
[hidden] { display: none !important; }
a { color: var(--gold-bright); }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--gold-bright); outline-offset: 3px;
}

/* Page shells */
.page { position: relative; min-height: 100vh; padding: 56px var(--gutter) 64px; }
.page > * { position: relative; z-index: 1; }
.hero { background-color: #0b1418; background-position: center 40%; background-size: cover; background-repeat: no-repeat; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(6,12,16,.55) 0%, rgba(6,12,16,.25) 30%, rgba(6,12,16,.35) 70%, rgba(6,12,16,.85) 100%),
    radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 35%, rgba(0,0,0,.5) 100%);
}
.plain {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,163,90,.14), rgba(201,163,90,0) 60%),
    radial-gradient(ellipse at 50% 100%, rgba(122,92,42,.12), rgba(122,92,42,0) 55%),
    #0f0d0b;
}

.hdr { text-align: center; margin-bottom: 28px; }
.hdr h1 {
  font-family: var(--display); font-weight: 700; font-size: 36px; letter-spacing: .06em; color: var(--gold-bright);
  margin: 0; text-shadow: 0 2px 0 #3a2a10, 0 0 28px rgba(233,208,138,.35), 0 2px 12px rgba(0,0,0,.8);
}
.hdr p { margin: 8px auto 0; max-width: 34em; font-size: 18px; color: var(--cream); font-style: italic; text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,.8); }

/* Gold-trimmed window */
.win {
  max-width: 700px; margin: 0 auto; background: var(--frame); border: 2px solid var(--trim);
  outline: 2px solid var(--trim-dark); outline-offset: 2px;
  box-shadow: inset 0 0 0 1px var(--gold), 0 30px 60px rgba(0,0,0,.7); position: relative;
}
.win::before, .win::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--gold); background: var(--frame); transform: rotate(45deg);
}
.win::before { left: -9px; top: -9px; }
.win::after { right: -9px; top: -9px; }
.title {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px;
  font-family: var(--display); font-weight: 700; letter-spacing: .08em; font-size: 14px; color: var(--gold-bright);
  text-align: center; padding: 10px 14px; background: linear-gradient(var(--frame-hi), var(--frame)); border-bottom: 1px solid var(--trim);
}
.title i { font-style: normal; color: #a08a5a; margin: 0 10px; }
.title .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--cream); letter-spacing: .04em; }
.title.split { justify-content: space-between; text-align: left; flex-wrap: wrap; }
.title .acct { display: flex; align-items: center; gap: 10px; min-width: 0; font-family: var(--serif); font-weight: 600; letter-spacing: .02em; }
.linkbtn { background: none; border: 0; padding: 4px 2px; font: 600 14px var(--serif); color: var(--gold-bright); text-decoration: underline; cursor: pointer; }

/* Letter */
.letter {
  margin: 16px; background: var(--parchment); color: var(--ink); padding: 24px 28px; position: relative;
  box-shadow: inset 0 0 40px rgba(120,80,20,.25), inset 0 0 0 1px var(--parchment-edge);
}
.from { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.subject { font-family: var(--display); font-weight: 700; font-size: 21px; margin: 0 0 14px; color: var(--ink); }
.item { display: flex; align-items: center; gap: 14px; background: var(--frame); color: var(--parchment); padding: 10px 12px; border: 1px solid var(--trim); margin: 0 0 14px; width: fit-content; max-width: 100%; }
.icon { flex: none; width: 44px; height: 44px; border: 2px solid var(--uncommon); background: linear-gradient(135deg, #6e7a86, #2f3a44); box-shadow: 0 0 10px rgba(30,255,0,.35); }
.item b { color: var(--uncommon); font-weight: 600; font-size: 17px; display: block; }
.item small { color: var(--muted); font-size: 13px; }
.money { font-size: 17px; margin: 0 0 12px; }
.coin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin: 0 2px 0 6px; }
.coin-g { background: radial-gradient(circle at 35% 35%, #ffe79a, #c9a035 60%, #8a6a1c); }
.coin-s { background: radial-gradient(circle at 35% 35%, #fff, #b7bcc2 60%, #6f757c); }
.coin-c { background: radial-gradient(circle at 35% 35%, #f3b48b, #b86a3a 60%, #6e3d20); }
.money .note { color: var(--ink-soft); }
.body { font-size: 17px; line-height: 1.55; margin: 0 0 14px; }
.wire { font-family: var(--type); font-size: 15px; background: #f6efd8; display: inline-block; padding: 4px 10px 2px; transform: rotate(-.6deg); box-shadow: 0 1px 0 #cdbd8e; color: #221b12; }
.seal {
  position: absolute; right: 26px; top: 20px; width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c93b2e, #7a1f16 70%, #5a150f); box-shadow: 0 3px 6px rgba(0,0,0,.4);
  display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: #f3c7bd; font-size: 18px;
}

/* Buttons */
.btns { display: flex; gap: 12px; padding: 0 16px 16px; flex-wrap: wrap; }
.btns:not(:has(.btn:not([hidden]))) { display: none; }
.btn {
  flex: 1 1 220px; display: block; text-align: center; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .04em;
  color: #f7e9c6; padding: 12px 16px; background: linear-gradient(var(--red), var(--red-dark)); border: 1px solid var(--gold);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 2px 0 var(--trim-dark); text-shadow: 0 1px 1px #000;
  text-decoration: none; cursor: pointer; font-size: 15px;
}
.btn:hover { filter: brightness(1.12); }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.btn[aria-disabled="true"]:hover { filter: none; }
.btn[aria-disabled="true"]:active { transform: none; }
.btn:active { transform: translateY(1px); }
.btn.alt { background: linear-gradient(#3a3028, #231c16); }
.btn em { display: block; font: 400 13px var(--serif); letter-spacing: 0; color: var(--muted); margin-top: 2px; }
button.btn { width: auto; }
.signin-pad { padding: 8px 16px 16px; }
.signin-pad .btn { width: 100%; }

.foot { text-align: center; font-size: 15px; color: #e3d2a6; text-shadow: 0 1px 3px #000; margin: 22px auto 0; max-width: 700px; }
.foot a { color: var(--gold-bright); white-space: nowrap; }
.foot .sep { display: inline-block; width: 10px; }

/* Web auction view */
.rowlist { list-style: none; margin: 0; padding: 0; }
.letter.list { padding: 16px 20px; }
.sect { font-family: var(--display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 14px 0 6px; }
.sect:first-child { margin-top: 0; }
.rowlist li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--parchment-edge);
}
.rowlist li:last-child { border-bottom: 0; }
.rowlist li.empty { display: block; color: var(--ink-soft); font-style: italic; }
.name { font-weight: 600; font-size: 18px; overflow-wrap: anywhere; min-width: 0; color: #0f6b00; text-shadow: 0 0 0 #000; }
.rowlist li.done .name { color: var(--q-grey); }
.qty { color: var(--ink-soft); font-weight: 400; font-size: 15px; }
.price { text-align: right; white-space: nowrap; font-size: 16px; }
.meta { color: var(--ink-soft); font-size: 14px; }
.pill {
  justify-self: end; display: inline-block; padding: 0 10px; border-radius: 999px; font-size: 13px; line-height: 1.6;
  background: var(--frame); border: 1px solid var(--trim); text-transform: capitalize; font-weight: 600;
}
.pill.active { color: var(--q-common); }
.pill.sold, .pill.sold_ingame { color: var(--q-gold); }
.pill.expired, .pill.unknown, .pill.cancelled { color: var(--q-grey); }
.notice { margin: 0 16px 16px; color: var(--cream); font-size: 15px; }
.notice:empty { display: none; }
.letter .notice { margin: 12px 0 0; color: var(--ink-soft); }
.alert { margin: 16px; padding: 10px 14px; background: #3a1510; border: 1px solid var(--red); color: #f3c7bd; }

/* Phones with push notifications (decorative) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.duo { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 28px; justify-content: center; align-items: center; }
.duo .win { margin: 0 auto; width: 100%; }
.cluster { position: relative; order: -1; display: flex; justify-content: center; pointer-events: none; }
.phone { width: 280px; height: 580px; border-radius: 46px; background: #0d0d0f; padding: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.7), inset 0 0 0 2px #2a2a2e; position: relative; flex: none; }
.phone.android { display: none; }
.phone .screen { position: absolute; inset: 10px; border-radius: 38px; overflow: hidden; background:
    radial-gradient(ellipse at 50% 110%, #1b3b3a 0%, rgba(27,59,58,0) 60%), linear-gradient(180deg, #0a1a24 0%, #102c38 60%, #15393c 100%); }
.phone .screen::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.5) 100%); }
.phone .screen::after { content: ""; position: absolute; inset: 0; z-index: 0; background: url("https://api.goblintelegram.com/api/files/assets/jbpzu35gzpsqlut/harbour_7r20m7emzq.jpg") center 55% / cover no-repeat; opacity: .85; }
.phone .notch { position: absolute; top: 10px; left: 50%; width: 96px; height: 26px; margin-left: -48px; background: #0d0d0f; border-radius: 0 0 18px 18px; z-index: 3; }
.phone .punch { position: absolute; top: 18px; left: 50%; width: 90px; height: 24px; margin-left: -45px; background: #0d0d0f; border-radius: 14px; z-index: 3; }
.phone .clock { position: relative; z-index: 2; text-align: center; color: #fff; font: 300 65px/1 -apple-system, "SF Pro Display", "Helvetica Neue", sans-serif; margin-top: 78px; letter-spacing: -.035em; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.phone .date { position: relative; z-index: 2; text-align: center; color: #fff; font: 500 15px/1.2 -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", sans-serif; margin-top: 4px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.phone.android .clock { font-family: Roboto, "Helvetica Neue", sans-serif; font-weight: 400; font-size: 58px; letter-spacing: -.02em; }
.notif { position: relative; z-index: 2; margin: 24px 11px 0; border-radius: 14px; padding: 8px 9px; display: grid; grid-template-columns: 27px 1fr; gap: 8px; align-items: start; font-family: -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", sans-serif; }
.notif.ios { background: rgba(245,245,247,.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #111; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.notif.ios.stack { margin-top: 6px; transform: scale(.96); opacity: .9; }
.notif .appicon { width: 27px; height: 27px; border-radius: 6px; background: linear-gradient(145deg, #2f6b3a, #1d4a28); display: grid; place-items: center; font: 900 13px Cinzel, serif; color: #e9d08a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.notif .top { display: flex; justify-content: space-between; gap: 8px; font: 600 11px/1.25 -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", sans-serif; }
.notif .top span:last-child { font-weight: 400; color: #6b6b70; }
.notif .msg { font: 400 11px/1.3 -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", sans-serif; margin-top: 1px; }
.notif .msg b { font-weight: 600; }
.notif.android { background: #1f2326; color: #e8eaed; border-radius: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.4); grid-template-columns: 23px 1fr; }
.notif.android .appicon { width: 23px; height: 23px; border-radius: 50%; font-size: 12px; }
.notif.android .top { font: 500 10px Roboto, "Helvetica Neue", sans-serif; color: #bfc4c8; }
.notif.android .top span:last-child { color: #9aa0a6; }
.notif.android .ntitle { font: 500 12px Roboto, "Helvetica Neue", sans-serif; margin-top: 2px; }
.notif.android .msg { font: 400 11px/1.3 Roboto, "Helvetica Neue", sans-serif; color: #d7dadd; }
.notif.android .actions { grid-column: 2; margin-top: 6px; font: 500 11px Roboto, "Helvetica Neue", sans-serif; color: #8ab4f8; }
.notif.android .actions span { margin-right: 16px; }
.phone .home { position: absolute; bottom: 10px; left: 50%; width: 110px; height: 5px; margin-left: -55px; border-radius: 3px; background: rgba(255,255,255,.8); z-index: 3; }

@media (min-width: 1360px) {
  .duo { grid-template-columns: minmax(0, 700px) 600px; }
  .cluster { order: 0; display: block; height: 740px; }
  .cluster .phone { width: 310px; height: 640px; position: absolute; }
  .cluster .phone.ios { left: 0; top: 40px; z-index: 2; transform: rotate(-5deg); }
  .cluster .phone.android { display: block; left: 280px; top: -6px; transform: rotate(6deg) scale(.94); opacity: .97; }
  .phone .clock { font-size: 72px; margin-top: 88px; }
  .phone.android .clock { font-size: 64px; }
  .phone .date { font-size: 16px; }
  .notif { margin: 26px 12px 0; border-radius: 16px; padding: 9px 10px; grid-template-columns: 30px 1fr; }
  .notif .appicon { width: 30px; height: 30px; border-radius: 7px; font-size: 14px; }
  .notif .top, .notif .msg { font-size: 12px; }
  .notif.android { border-radius: 22px; grid-template-columns: 26px 1fr; }
  .notif.android .appicon { width: 26px; height: 26px; border-radius: 50%; font-size: 13px; }
  .notif.android .top { font-size: 11px; }
  .notif.android .ntitle { font-size: 13px; }
  .notif.android .msg { font-size: 12px; }
  .notif.android .actions { font-size: 12px; }
}
@media (max-width: 759px) {
  .cluster .phone { width: 240px; height: 500px; border-radius: 40px; }
  .phone .screen { border-radius: 32px; }
  .phone .clock { font-size: 56px; margin-top: 62px; }
  .phone .date { font-size: 13px; }
  .notif { margin: 22px 9px 0; border-radius: 12px; padding: 7px 8px; grid-template-columns: 23px 1fr; gap: 7px; }
  .notif .appicon { width: 23px; height: 23px; border-radius: 5px; font-size: 11px; }
  .notif .top, .notif .msg { font-size: 10px; }
}

@media (max-width: 480px) {
  .page { padding: 32px 16px 40px; }
  .hdr h1 { font-size: 28px; }
  .hdr p { font-size: 16px; }
  .win { margin-left: 4px; margin-right: 4px; }
  .letter { margin: 10px; padding: 18px 16px; }
  .from { padding-right: 52px; }
  .seal { width: 40px; height: 40px; right: 12px; top: 12px; font-size: 14px; }
  .subject { font-size: 18px; }
  .btns { flex-direction: column; gap: 10px; padding: 0 10px 12px; }
  .btn { flex: none; width: 100%; }
  .title { font-size: 12px; letter-spacing: .05em; padding: 10px; }
  .title i { margin: 0 4px; }
  .letter.list { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .wire { transform: none; }
  .btn:active { transform: none; }
}

/* Telegraph decode: pretend-Morse that clicks into English (see js/landing.js) */
.dc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dc-vis { font-variant-numeric: tabular-nums; }
.dc-cur { animation: dc-blink .5s steps(1) infinite; }
@keyframes dc-blink { 50% { opacity: 0; } }
.dc-flash { animation: dc-flash .4s ease-out; }
@keyframes dc-flash { from { color: #e9d08a; } }
