@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/syne-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/syne-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --ink: #e8f0e4;
  --ink-dim: #a7b8a4;
  --moss: #1c3a28;
  --moss-deep: #0b1610;
  --venom: #c6f26d;
  --venom-deep: #8fbf3a;
  --earth: #2a1f14;
  --line: rgba(198, 242, 109, 0.22);
  --danger: #ffb4a2;
  --font-brand: "Syne", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--moss-deep);
  position: relative;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(198, 242, 109, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 80%, rgba(42, 31, 20, 0.85), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 60%, rgba(28, 58, 40, 0.9), transparent 45%),
    linear-gradient(165deg, #102018 0%, #0b1610 45%, #1a120c 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(
      -18deg,
      transparent 0 11px,
      rgba(198, 242, 109, 0.04) 11px 12px
    );
  animation: grain 8s linear infinite;
  pointer-events: none;
}

@keyframes drift {
  from { filter: hue-rotate(0deg) saturate(1); }
  to { filter: hue-rotate(-8deg) saturate(1.08); }
}

@keyframes grain {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.flash-wrap {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(92vw, 28rem);
}

.flash {
  margin: 0 0 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  background: rgba(11, 22, 16, 0.92);
  font-size: 0.92rem;
}

.flash-error { color: var(--danger); border-color: rgba(255, 180, 162, 0.35); }

.page-unlock {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
}

.hero {
  width: min(100%, 40rem);
  text-align: left;
  animation: rise 0.9s ease both;
}

.brand {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(2.8rem, 10vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
  color: var(--venom);
  text-shadow: 0 0 40px rgba(198, 242, 109, 0.15);
  animation: rise 1s ease both;
}

.brand-inline {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0;
  animation: none;
}

.headline {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 32rem;
  color: var(--ink-dim);
  font-size: 1.05rem;
  line-height: 1.55;
}

.unlock-form {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
  animation: rise 1.15s ease both;
}

input, textarea, button {
  font: inherit;
}

input, textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: rgba(8, 16, 12, 0.72);
  color: var(--ink);
  border-radius: 0;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--venom);
}

textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.5;
}

button {
  appearance: none;
  border: 0;
  background: var(--venom);
  color: #132016;
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

button:hover { background: #d7ff86; transform: translateY(-1px); }
button:active { transform: translateY(0); }

.linkish {
  background: transparent;
  color: var(--ink-dim);
  padding: 0.35rem 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.linkish:hover { color: var(--venom); background: transparent; transform: none; }

.crypto-note {
  margin: 1.5rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.crypto-note span { opacity: 0.75; }

.page-board {
  width: min(100%, 42rem);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.board-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
  animation: rise 0.7s ease both;
}

.compose, .feed {
  animation: rise 0.95s ease both;
}

.compose { margin-bottom: 3rem; }

.compose form {
  display: grid;
  gap: 0.65rem;
}

.section-title {
  font-family: var(--font-brand);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.section-lede, .hint, .empty {
  color: var(--ink-dim);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.note {
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
  animation: rise 0.8s ease both;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
}

.nick { color: var(--venom-deep); }
.nick.muted { color: var(--ink-dim); opacity: 0.8; }

.note-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  font-size: 1.05rem;
}

.page-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
}

.auth-hero, .unlock-hero {
  width: min(100%, 40rem);
}

.auth-form, .unlock-form {
  display: grid;
  gap: 0.55rem;
  max-width: 28rem;
  animation: rise 1.15s ease both;
}

.field-label {
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin-top: 0.35rem;
}

select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: rgba(8, 16, 12, 0.72);
  color: var(--ink);
  border-radius: 0;
  font: inherit;
  outline: none;
}

select:focus {
  border-color: var(--venom);
}

.auth-switch {
  margin: 1.25rem 0 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.auth-switch a,
a.linkish {
  color: var(--venom);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-switch a:hover,
a.linkish:hover {
  color: #d7ff86;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.85rem;
}

.user-chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
}

.board-top.narrow {
  width: min(100%, 40rem);
  margin: 0 auto 1rem;
  padding: 1.5rem 1.25rem 0;
}

.inline-form { display: inline; margin: 0; }

.linkish.danger { color: var(--danger); }

.flash-ok { color: var(--venom); }

.admin { animation: rise 0.9s ease both; }

.admin-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table select {
  min-width: 7rem;
  padding: 0.45rem 0.55rem;
}

.admin-table button {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
}

/* —— Snapchat-style shield —— */
.shield-zone,
.shield-zone * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

.compose input,
.compose textarea,
.compose select,
.auth-form input,
.auth-form select,
.unlock-form input {
  -webkit-user-select: text !important;
  user-select: text !important;
}

.note-body,
[data-shield] {
  -webkit-user-select: none;
  user-select: none;
}

.shield-banner {
  margin: 0 0 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.82rem;
  line-height: 1.45;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--ink-dim);
  font-size: 0.92rem;
  margin: 0.35rem 0 0;
}

.check-row input {
  width: auto;
  margin-top: 0.2rem;
}

.att-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.att-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.att-link {
  color: var(--venom);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.att-link:hover { border-color: var(--venom); }

.att-flag {
  margin-left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-dim);
}

.page-media {
  width: min(100%, 56rem);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.media-stage { animation: rise 0.85s ease both; }

.media-frame {
  margin-top: 1rem;
  min-height: 12rem;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  padding: 0.75rem;
}

.media-frame canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.media-actions { margin-top: 1rem; }

.buttonish {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--venom);
  color: #132016;
  font-family: var(--font-brand);
  font-weight: 700;
  text-decoration: none;
}

.shield-veil {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  place-items: center;
  background: rgba(5, 10, 8, 0.96);
  color: var(--ink-dim);
  font-family: var(--font-brand);
  font-size: 1.2rem;
  text-align: center;
  padding: 2rem;
}

html.is-shield-obscured .shield-veil {
  display: grid;
}

html.is-shield-obscured .note-body,
html.is-shield-obscured .media-frame,
html.is-shield-obscured [data-shield] {
  filter: blur(18px);
  opacity: 0.15;
}

@media print {
  .note-body,
  [data-shield],
  .media-frame,
  .att-list {
    visibility: hidden !important;
  }
  body::after {
    content: "Protected content — printing blocked.";
    display: block;
    text-align: center;
    margin-top: 4rem;
  }
}

@media (max-width: 560px) {
  .page-board { padding-top: 1.25rem; }
  .brand { font-size: clamp(2.4rem, 14vw, 3.6rem); }
  .board-top { flex-direction: column; align-items: flex-start; }
  .top-actions { justify-content: flex-start; }
}
