:root {
  --stroke: 2.5px;
  --pad: 14px;
  --max-width: 980px;
  --ink: #000;
  --paper: #fff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.page {
  width: min(var(--max-width), 92vw);
  height: min(640px, 92vh);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
}

.header,
.footer {
  position: relative;
}

.site-name {
  font-size: 28px;
  letter-spacing: 0.5px;
  padding: 6px 2px;
}

.header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  font-size: 16px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='8' viewBox='0 0 60 8'><path d='M1 5 C12 2 16 7 28 4 S46 2 58 5' stroke='black' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.separator {
  position: relative;
  width: 100%;
  height: 18px;
}

.separator svg {
  width: 100%;
  height: 100%;
}

.separator path {
  fill: none;
  stroke: var(--ink);
  stroke-width: var(--stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border: var(--stroke) solid var(--ink);
  border-radius: 50%;
}

.dot-a { top: 0px; left: 6%; }
.dot-b { top: 8px; right: 12%; }
.dot-c { top: 4px; left: 14%; }

.main {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: stretch;
}

.card {
  position: relative;
  padding: calc(var(--pad) + 2px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

h2 {
  margin: 0 0 8px;
  letter-spacing: 2px;
  font-size: 16px;
}

p {
  margin: 0 0 8px;
  line-height: 1.35;
  font-size: 15px;
}

.scribble-box {
  border: var(--stroke) solid transparent;
  border-image-source: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><path d='M8 15 C36 12 54 16 112 8 M112 12 L108 115 M104 110 C63 113 43 110 10 111 M11 110 L6 14' stroke='black' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  border-image-slice: 30;
  border-image-repeat: round;
}

.image-slot {
  align-items: center;
  justify-content: center;
}

.about a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-style: wavy;
}

.about a:hover {
  text-decoration-style: solid;
}

.slot-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%) contrast(115%);
  image-rendering: auto;
}

.image-label {
  font-size: 16px;
  letter-spacing: 1px;
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: var(--pad);
}

.ca-label {
  font-size: 14px;
  word-break: break-all;
}

.copy-btn {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 1px;
  padding: 8px 14px;
  border: var(--stroke) solid transparent;
  border-image-source: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='40' viewBox='0 0 90 40'><path d='M6 8 C18 4 30 6 42 5 C58 4 70 10 82 6 L82 34 C74 33 62 35 48 33 C36 31 22 36 8 34 Z' stroke='black' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  border-image-slice: 20;
  border-image-repeat: round;
  cursor: pointer;
  transition: transform 0.08s ease;
}

.copy-btn:hover {
  transform: translateY(-1px);
}

.copy-btn.copied {
  letter-spacing: 0.5px;
}

@media (max-width: 720px) {
  body {
    align-items: flex-start;
    padding: 16px 0;
  }

  .page {
    height: auto;
    grid-template-rows: auto auto auto;
  }

  .main {
    grid-template-columns: 1fr;
  }
}

