:root {
  --navy: #1f3a5f;
  --navy-2: #2d5283;
  --text: #1d1d1f;
  --muted: #5b6270;
  --line: #d5dae2;
  --bg: #f4f6f9;
  --card: #ffffff;
  --todo: #fff2a8;
  --ok: #e3f0ff;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 17px; line-height: 1.75;
}
a { color: var(--navy-2); }
header.site {
  background: var(--navy); color: #fff; padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
}
header.site a { color: #fff; font-weight: bold; font-size: 20px; text-decoration: none; }
header.site span { font-size: 14px; opacity: .85; }
main { max-width: 1120px; margin: 0 auto; padding: 16px; }
h1 { font-size: 26px; line-height: 1.4; margin: 12px 0 8px; color: var(--navy); }
h1 small { display: block; font-size: 16px; color: var(--muted); font-weight: normal; }
h2 { font-size: 20px; color: var(--navy); margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.crumb { font-size: 14px; color: var(--muted); }

/* 一覧 */
.search {
  width: 100%; font-size: 18px; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 8px; margin-bottom: 16px; background: #fff;
}
.group, .more { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.list a {
  display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; color: var(--text); background: #fafbfc;
}
.list a:hover { border-color: var(--navy-2); background: #eef3fa; }
.none { color: var(--muted); }
.group h3 { font-size: 17px; color: var(--navy); margin: 0 0 8px; }
.genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.genres a {
  padding: 8px 14px; border-radius: 999px; background: var(--navy); color: #fff;
  text-decoration: none; font-size: 15px; font-weight: bold;
}
.genre-h { font-size: 22px; margin: 28px 0 12px; padding-bottom: 6px; border-bottom: 3px solid var(--navy); }
.genre-h a { color: var(--navy); text-decoration: none; }

/* 作成画面 */
.app { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.fields { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.fields label { display: block; font-weight: bold; margin-top: 10px; }
.fields label:first-child { margin-top: 0; }
.fields input {
  width: 100%; font-size: 17px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 8px;
}
.fields input:focus { outline: none; border-color: var(--navy-2); }
.hint { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tools span { flex: 1 1 100%; font-size: 15px; color: var(--muted); }
button, .btn {
  font: inherit; font-size: 17px; font-weight: bold; cursor: pointer;
  padding: 10px 20px; border-radius: 8px; border: 2px solid var(--navy);
  background: var(--navy); color: #fff; text-decoration: none; display: inline-block;
}
button.sub, .btn.sub { background: #fff; color: var(--navy); }

/* 紙 */
.paper {
  background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.06);
  padding: 48px 52px; min-height: 700px;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "MS Mincho", serif;
  font-size: 15.5px; line-height: 1.85; color: #000;
}
.paper p { margin: 0; }
.paper .right { text-align: right; }
.paper .center { text-align: center; margin: 14px 0 8px; }
.paper h2 {
  text-align: center; font-size: 22px; color: #000; margin: 22px 0 18px;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}
.paper .p { text-indent: 1em; margin-bottom: 4px; }
.paper .listTitle { font-weight: bold; margin-top: 12px; }
.paper ul { margin: 4px 0 8px; padding-left: 2.2em; list-style: "・"; }
.paper .ki { display: grid; grid-template-columns: 9em 1fr; gap: 8px; padding-left: 2em; margin-bottom: 2px; }
.paper .contact { border: 1px solid #555; margin: 26px 0 0 40%; padding: 8px 12px; }
.paper .contact p:first-child { font-weight: bold; }
.paper .sheet { width: 100%; border-collapse: collapse; margin: 16px 0 4px; table-layout: fixed; }
.paper .sheet th, .paper .sheet td { border: 1px solid #555; padding: 6px 8px; height: 2.6em; font-size: .9em; }
.paper .sheet th { background: #e8edf3; font-family: "Hiragino Sans", "Yu Gothic", sans-serif; }
.paper .todo { background: var(--todo); }
.paper .ok { background: var(--ok); }

/* 販売への案内 */
.cta { background: #eef3fa; border: 2px solid var(--navy-2); border-radius: 10px; padding: 18px; margin: 24px 0 16px; }
.cta-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }

footer.site { max-width: 1120px; margin: 0 auto; padding: 8px 16px 32px; font-size: 14px; color: var(--muted); }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .paper { padding: 24px 18px; min-height: 0; font-size: 14.5px; }
  .paper .contact { margin-left: 0; }
  .paper .ki { grid-template-columns: 1fr; gap: 0; padding-left: 1em; }
  .paper .ki span:first-child { font-weight: bold; }
  h1 { font-size: 22px; }
}

@page { size: A4; margin: 18mm 18mm; }
@media print {
  body { background: #fff; }
  header.site, footer.site, .crumb, h1, .lead, .fields, .tools, .cta, .more { display: none !important; }
  main { padding: 0; max-width: none; }
  .app { display: block; }
  .paper { border: 0; box-shadow: none; padding: 0; min-height: 0; font-size: 11pt; }
  .paper .ki { grid-template-columns: 9em 1fr; padding-left: 2em; }
  .paper .contact { margin-left: 34%; }
  .paper .ki span { font-weight: normal !important; }
  .paper .todo, .paper .ok { background: none; }
  .paper .sheet th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
