@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --canvas: #101215;
  --surface: #171a1f;
  --surface-raised: #1c2026;
  --ink: #f0f0eb;
  --muted: #9ba1a8;
  --line: #30353d;
  --accent: #cdfb59;
  --accent-ink: #162000;
  --danger: #ff8b8b;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 15px/1.55 Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(#ffffff05 1px, transparent 1px), linear-gradient(90deg, #ffffff05 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  mask-image: linear-gradient(to bottom, #0006, transparent 70%);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 48px));
  height: 76px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.logo {
  color: var(--ink);
  font: 500 16px/1 "DM Mono", monospace;
  letter-spacing: -.6px;
  text-decoration: none;
}

.logo::before { color: var(--accent); content: "~/"; }

nav { display: flex; align-items: center; gap: 8px; }
.language-switch { display: inline-flex; margin-right: 8px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.language-switch button { min-height: 28px; border: 0; border-radius: 0; padding: 5px 7px; color: var(--muted); font-size: 10px; }
.language-switch button + button { border-left: 1px solid var(--line); }
.language-switch button:hover { background: transparent; color: var(--ink); }
.language-switch button.active { color: var(--accent); background: #cdfb590d; }

main { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 96px; }

h1, h2, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 8px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -1.8px; line-height: 1.12; }
h2 { margin-bottom: 0; font-size: 17px; letter-spacing: -.4px; }

.muted { color: var(--muted); }

.hero { max-width: 690px; margin: 86px 0; }
.hero h1 { max-width: 610px; font-size: clamp(38px, 6vw, 60px); letter-spacing: -3px; }
.hero-label { margin-bottom: 20px; color: var(--accent); font: 500 12px "DM Mono", monospace; letter-spacing: 1px; }
.hero p { max-width: 570px; margin: 20px 0 28px; font-size: 17px; }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 12px;
  color: var(--ink);
  background: transparent;
  font: 500 12px/1 "DM Mono", monospace;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.button:hover, button:hover { border-color: #747b85; background: var(--surface-raised); }
.button:active, button:active { transform: translateY(1px); }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.button.primary, button.primary { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.button.primary:hover, button.primary:hover { border-color: #e1ff94; background: #ddff89; }
button.danger { color: var(--danger); }
button.danger:hover { border-color: #9a565b; background: #2a1b20; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 34px; }
.card { min-height: 134px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .16s ease, transform .16s ease; }
.card:hover { border-color: #747b85; transform: translateY(-2px); }
.card a { color: var(--ink); font-size: 17px; font-weight: 600; text-decoration: none; }
.card a::before { margin-right: 8px; color: var(--accent); font: 400 12px "DM Mono", monospace; content: "[ ]"; }
.card p { margin: 28px 0 0; font: 12px "DM Mono", monospace; }

.wishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 28px; }
.wish { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wish.purchased { opacity: .55; }
.wish img, .placeholder { display: block; width: 100%; height: 178px; object-fit: cover; background: #20242a; }
.placeholder { display: grid; place-items: center; color: var(--muted); font-size: 26px; }
.wish-body { padding: 16px; }
.wish-title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.wish-title a { color: var(--ink); text-decoration-color: #7b8490; text-underline-offset: 3px; }
.wish-title a:hover { color: var(--accent); }
.wish-meta { min-height: 31px; margin: 9px 0 16px; color: var(--muted); font-size: 13px; }
.wish-actions { display: flex; gap: 8px; align-items: center; }
.check { margin: 0 0 14px; color: var(--accent); font: 12px "DM Mono", monospace; }

.share { display: flex; align-items: center; gap: 8px; margin-top: 26px; color: var(--muted); font: 12px "DM Mono", monospace; }
.share span::before { color: var(--accent); content: "↗ "; }
.share input { max-width: 340px; min-width: 0; padding: 7px 9px; }

.notice { margin: 30px 0; padding: 14px 16px; border: 1px dashed #555d67; border-radius: var(--radius); color: var(--muted); background: #16191d; }

dialog { width: min(440px, calc(100% - 32px)); border: 1px solid #4a515c; border-radius: var(--radius); padding: 22px; color: var(--ink); background: var(--surface-raised); box-shadow: 0 24px 80px #000a; }
dialog::backdrop { background: #08090ccc; backdrop-filter: blur(3px); }
form { display: grid; gap: 13px; }
form > .row button { min-height: 28px; border: 0; padding: 0 4px; color: var(--muted); font-size: 18px; }
form > .row button:hover { color: var(--ink); background: transparent; }
label { display: grid; gap: 6px; color: var(--muted); font: 12px "DM Mono", monospace; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; outline: none; color: var(--ink); background: #111419; font: 14px Manrope, sans-serif; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #cdfb5914; }
input[type="file"] { padding: 7px; color: var(--muted); font-size: 12px; }
input[type="file"]::file-selector-button { margin-right: 10px; border: 0; border-radius: 4px; padding: 5px 7px; color: var(--ink); background: #30353d; font: 11px "DM Mono", monospace; cursor: pointer; }
textarea { min-height: 82px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

@media (max-width: 600px) {
  header, main { width: min(100% - 32px, 1160px); }
  header { height: 64px; }
  main { padding-top: 48px; }
  .hero { margin: 40px 0 68px; }
  .hero h1 { font-size: 39px; letter-spacing: -2px; }
  nav .muted { display: none; }
  .share { align-items: stretch; flex-wrap: wrap; }
  .share input { flex: 1 1 100%; max-width: none; }
}
