:root {
  --paper: #eef4f2;
  --paper-deep: #dfeae7;
  --surface: #fbfdfb;
  --surface-strong: #ffffff;
  --ink: #172126;
  --ink-soft: #4c5b60;
  --muted: #718184;
  --rule: #ccd9d6;
  --rule-dark: #a8bbb6;
  --moss: #167a72;
  --moss-dark: #0f5f59;
  --brick: #d65f45;
  --ochre: #e4aa4f;
  --sand: #e2efec;
  --blueprint: #3f7184;
  --warn-bg: #fff7e8;
  --warn-line: #efbd68;
  --warn-text: #8b4a1f;
  --shadow: 12px 14px 0 rgba(18, 92, 86, 0.11);
  --shadow-soft: 5px 6px 0 rgba(18, 92, 86, 0.07);
  --radius: 10px;
}

* { box-sizing: border-box; }

html { background: #cad9d5; }

body {
  margin: 0;
  padding: 26px 16px 34px;
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Yu Gothic", "Meiryo", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.75;
  background:
    linear-gradient(90deg, rgba(22,122,114,0.055) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(rgba(22,122,114,0.04) 1px, transparent 1px) 0 0 / 26px 26px,
    radial-gradient(circle at 14% 8%, rgba(228,170,79,0.13), transparent 26%),
    radial-gradient(circle at 92% 12%, rgba(63,113,132,0.16), transparent 25%),
    linear-gradient(180deg, var(--paper), var(--paper-deep));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    repeating-linear-gradient(0deg, rgba(23,33,38,0.03) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 40% 20%, rgba(255,255,255,0.55), transparent 16%);
  mix-blend-mode: multiply;
}

a {
  color: var(--moss-dark);
  text-decoration: underline;
  text-decoration-color: rgba(22, 122, 114, 0.28);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brick);
  text-decoration-color: rgba(214, 95, 69, 0.44);
}

.page {
  position: relative;
  max-width: 1060px;
  margin: 0 auto;
  border: 1px solid var(--rule-dark);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34px;
  width: 1px;
  background: rgba(214, 95, 69, 0.22);
  z-index: 1;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px 9px 54px;
  border-bottom: 1px solid var(--rule-dark);
  background: #14282d;
  color: #eaf7f3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar::before {
  content: "RL";
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 24px;
  margin-left: -42px;
  border: 1px solid rgba(234,247,243,0.56);
  border-radius: 4px;
  color: #eaf7f3;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.header {
  position: relative;
  z-index: 2;
  padding: 34px 38px 28px 72px;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(135deg, rgba(251,253,251,0.96), rgba(238,244,242,0.9)),
    repeating-linear-gradient(-8deg, rgba(22,122,114,0.06) 0 1px, transparent 1px 16px);
  text-align: left;
}

.header::after {
  content: "clipboard / files / snippets";
  position: absolute;
  right: 32px;
  bottom: 18px;
  padding: 5px 9px;
  border: 1px solid rgba(214, 95, 69, 0.44);
  border-radius: 4px;
  color: var(--brick);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  transform: rotate(-1.3deg);
  background: rgba(255,255,255,0.74);
}

.header h1 {
  margin: 0;
  max-width: 760px;
  color: #151f24;
  font-family: "Yu Mincho", "BIZ UDPMincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.header p {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.header .sub {
  display: inline-flex;
  align-items: center;
  margin: 16px 8px 0 0;
  padding: 4px 10px 4px 9px;
  border: 1px solid var(--rule-dark);
  border-radius: 4px;
  background: #edf8f5;
  color: var(--moss-dark);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 2px 2px 0 rgba(18,92,86,0.08);
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 22px 0 54px;
  border-bottom: 1px solid var(--rule-dark);
  background: #e5efec;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border-right: 1px solid rgba(168,187,182,0.72);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.nav a:first-child { border-left: 1px solid rgba(168,187,182,0.72); }

.nav a:hover {
  background: rgba(255,255,255,0.78);
  color: var(--brick);
}

.nav a.active {
  position: relative;
  margin-top: -5px;
  min-height: 49px;
  border-top: 5px solid var(--moss);
  background: var(--surface);
  color: var(--moss-dark);
}

.content {
  position: relative;
  z-index: 2;
  padding: 24px 24px 26px 58px;
}

.box {
  position: relative;
  margin: 0 0 18px;
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.box:nth-child(odd) { transform: translateX(-2px); }
.box:nth-child(even) { transform: translateX(3px); }

.box::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -17px;
  width: 25px;
  height: 7px;
  border: 1px solid rgba(214,95,69,0.26);
  background: rgba(228,170,79,0.16);
  transform: rotate(-2deg);
}

.box h2 {
  margin: 0;
  padding: 13px 18px 12px;
  border-bottom: 1px solid var(--rule);
  border-radius: var(--radius) var(--radius) 0 0;
  background:
    linear-gradient(90deg, rgba(22,122,114,0.11), transparent 54%),
    #f1f8f5;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.box .inner {
  padding: 18px 20px 21px;
}

.inner > p:first-child { margin-top: 0; }

.info-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--rule-dark);
  border-radius: 8px;
  background: #fffdf7;
}

.info-table th,
.info-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: none; }

.info-table th {
  width: 220px;
  background:
    linear-gradient(90deg, rgba(22,122,114,0.10), rgba(22,122,114,0.03));
  color: var(--moss-dark);
  font-weight: 800;
}

.note,
.warn {
  position: relative;
  margin-top: 13px;
  padding: 13px 15px 13px 17px;
  border-radius: 8px;
  line-height: 1.8;
}

.note {
  border: 1px solid #adc9c0;
  background: #eef8f4;
  color: #355f57;
}

.note::before {
  content: "memo";
  position: absolute;
  top: -10px;
  right: 12px;
  padding: 1px 7px;
  border: 1px solid #adc9c0;
  border-radius: 999px;
  background: #ffffff;
  color: #5e7771;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.warn {
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn-text);
}

ul,
ol {
  margin: 10px 0 0;
  padding-left: 1.35rem;
}

li + li { margin-top: 4px; }

.faq-q {
  position: relative;
  margin-top: 18px;
  padding-left: 14px;
  color: var(--moss-dark);
  font-size: 15px;
  font-weight: 800;
}

.faq-q:first-child { margin-top: 0; }

.faq-q::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ochre);
}

.faq-a {
  margin-top: 6px;
  color: var(--ink-soft);
}

.mini {
  color: var(--muted);
  font-size: 12px;
}

.footer {
  position: relative;
  z-index: 2;
  padding: 20px 18px 26px 54px;
  border-top: 1px solid var(--rule-dark);
  background: #e5efec;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.footer-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 10px;
  border: 1px solid var(--rule-dark);
  border-radius: 4px;
  background: rgba(255,255,255,0.78);
  color: var(--moss-dark);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
}

.highlight {
  color: var(--brick);
  font-weight: 800;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 6px 4px;
  padding: 10px 18px;
  border: 1px solid var(--moss-dark);
  border-radius: 6px;
  background: var(--moss);
  color: #f7fffc;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 4px 4px 0 rgba(18,92,86,0.16);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.download-btn:hover {
  color: #f7fffc;
  text-decoration: none;
  background: var(--moss-dark);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(18,92,86,0.16);
}

.download-btn.secondary {
  border-color: #40545a;
  background: #53686e;
}

.download-btn.secondary:hover { background: #40545a; }

#donate .download-btn:first-child {
  border-color: #a9422f !important;
  background: var(--brick) !important;
}

.center { text-align: center; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 14px;
}

.usecase-card,
.platform-card {
  border: 1px solid var(--rule-dark);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,248,245,0.96));
  box-shadow: 4px 5px 0 rgba(18,92,86,0.07);
}

.usecase-card {
  padding: 14px 15px;
}

.usecase-card:nth-child(2) { transform: rotate(0.25deg); }
.usecase-card:nth-child(3) { transform: rotate(-0.2deg); }

.usecase-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
}

.usecase-card p {
  margin: 0;
  color: var(--ink-soft);
}

.codeblock {
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid #193238;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 100% 26px,
    #193238;
  color: #e7f7f3;
  font-family: "Cascadia Mono", "Consolas", "MS Gothic", monospace;
  line-height: 1.7;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0;
}

.platform-card {
  padding: 17px 15px 18px;
  text-align: left;
}

.platform-card .plat-name {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.platform-card .plat-sub {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.platform-card .plat-file {
  margin-bottom: 12px;
  padding: 6px 7px;
  border: 1px dashed var(--rule-dark);
  border-radius: 5px;
  background: rgba(255,255,255,0.82);
  color: var(--blueprint);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11px;
  word-break: break-all;
}

code {
  padding: 0.1em 0.3em;
  border: 1px solid rgba(168,187,182,0.65);
  border-radius: 4px;
  background: rgba(255,255,255,0.88);
  color: var(--blueprint);
  font-family: "Cascadia Mono", "Consolas", "MS Gothic", monospace;
  font-size: 0.9em;
}

@media (max-width: 980px) {
  body { padding: 10px; }
  .page {
    border-radius: 13px;
    box-shadow: 7px 8px 0 rgba(18, 92, 86, 0.11);
  }
  .page::before { left: 18px; }
  .topbar { padding-left: 36px; }
  .topbar::before { margin-left: -26px; width: 22px; }
  .header { padding: 28px 18px 46px 34px; }
  .header::after { left: 34px; right: auto; bottom: 16px; }
  .nav { padding-left: 18px; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { flex: 0 0 auto; }
  .content { padding: 16px 13px 18px 31px; }
  .box:nth-child(odd),
  .box:nth-child(even),
  .usecase-card:nth-child(2),
  .usecase-card:nth-child(3) { transform: none; }
  .box::before { display: none; }
  .two-col,
  .usecase-grid,
  .platform-grid { grid-template-columns: 1fr; }
  .info-table th { width: 145px; }
}

@media (max-width: 640px) {
  body { font-size: 13px; }
  .header h1 { font-size: 33px; }
  .info-table,
  .info-table tbody,
  .info-table tr,
  .info-table th,
  .info-table td { display: block; width: 100%; }
  .info-table th { border-bottom: 1px solid rgba(204,217,214,0.82); }
  .info-table td { border-bottom: 1px solid var(--rule); }
  .download-btn { width: 100%; margin-left: 0; margin-right: 0; }
}
