/* Klee One (c) 2020 The Klee Project Authors, SIL Open Font License 1.1. fonts/klee-one/OFL.txt */
@font-face {
  font-family: "Klee One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/klee-one/klee-one-400.woff2") format("woff2");
}

:root {
  --ink: #2a2a28;
  --muted: #5c5a54;
  --paper: #fffdf6;
  --paper-edge: #e6dfc8;
  --grid-line: #6e6a60;
  --grid-outer: #2f2c28;
  --bg: #d9d3c4;
  --toolbar: #2f3d36;
  --toolbar-text: #f4efe4;
  --accent: #c45c4a;
  --accent-dark: #a34838;
  --white: #fffef9;
  --danger: #9b2f2f;
  --page-w: 297mm;
  --page-h: 210mm;
  --page-pad: 12mm;
  --ui-font: "Yu Gothic UI", "Hiragino Sans", "Meiryo", sans-serif;
  --cell-font: "Klee One", "UD Digi Kyokasho NK-R", "YuKyokasho", "Yu Mincho", "Hiragino Mincho ProN", "MS Mincho", "Noto Serif JP", serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui-font);
}

h1,
p {
  margin: 0;
}

.global-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  padding: 6px 18px;
  background: #1f2a25;
  color: var(--toolbar-text);
  font-size: 13px;
}

.global-nav-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.global-nav-label {
  margin-right: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.global-nav a {
  padding: 3px 10px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.global-nav a:hover {
  background: #33423b;
}

.global-nav a[aria-current="page"] {
  background: var(--accent);
  font-weight: 700;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px 20px;
  padding: 14px 18px;
  background: var(--toolbar);
  color: var(--toolbar-text);
  position: sticky;
  top: 0;
  z-index: 10;
}

.toolbar-brand {
  color: inherit;
  text-decoration: none;
}

.toolbar-brand h1,
.toolbar-brand .brand-title {
  margin-top: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.toolbar-brand p {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.75;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.toolbar input,
.toolbar select,
.toolbar textarea {
  font: inherit;
}

.toolbar input,
.toolbar select {
  height: 34px;
  min-width: 72px;
  padding: 0 8px;
  border: 1px solid #4d5c54;
  border-radius: 6px;
  background: #24312c;
  color: var(--toolbar-text);
}

.toolbar input#template-name {
  min-width: 110px;
}

.toolbar select {
  min-width: 140px;
}

.toolbar input:focus,
.toolbar select:focus,
.composer textarea:focus {
  outline: 2px solid #e7b09f;
  outline-offset: 1px;
}

.btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #6d7c74;
  border-radius: 6px;
  background: #3d4e45;
  color: var(--toolbar-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.btn:hover {
  background: #4a5d53;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  background: transparent;
}

.toolbar-actions {
  margin-left: auto;
}

.guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 10px 18px;
  background: #efe8d8;
  border-bottom: 1px solid #d9d0bc;
}

.guide-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.guide-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

.guide-steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--toolbar);
  color: var(--toolbar-text);
  font-size: 11px;
  font-weight: 700;
}

.guide-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.composer {
  padding: 14px 18px 8px;
}

.composer-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.composer textarea {
  width: 100%;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #c9c1ad;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  font-family: var(--cell-font);
}

.status {
  margin-top: 8px;
  font-size: 13px;
  color: var(--danger);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-left: auto;
  font-size: 13px;
}

.site-nav a {
  color: inherit;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.tool-cards {
  max-width: 64rem;
  margin: 0 auto;
  padding: 8px 18px 20px;
}

.tool-cards h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tool-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid #d3cab4;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(60, 50, 30, 0.14);
}

.tool-card-icon {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--toolbar);
  color: var(--toolbar-text);
  font-family: var(--cell-font);
  font-size: 20px;
  font-weight: 400;
  font-synthesis: none;
}

.tool-card-icon.is-play {
  background: #f0a23b;
  color: #fff;
}

.tool-card-name {
  font-size: 15px;
  font-weight: 700;
}

.tool-card-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.tool-card-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #efe8d8;
  font-size: 10px;
  font-weight: 400;
  vertical-align: 2px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 16px;
  padding: 4px 18px 22px;
  font-size: 12px;
  color: var(--muted);
}

.site-footer a {
  color: inherit;
}

.site-version {
  letter-spacing: 0.06em;
}

.doc {
  max-width: 40rem;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.doc h1 {
  font-size: 28px;
  line-height: 1.4;
}

.doc h2 {
  margin: 1.6em 0 0.4em;
  font-size: 18px;
}

.doc p,
.doc li {
  margin: 0.6em 0;
  line-height: 1.8;
}

.doc ul {
  margin: 0.4em 0 0;
  padding-left: 1.3em;
}

.doc a {
  color: var(--accent-dark);
}

@media (max-width: 760px) {
  .toolbar {
    position: static;
  }
}

@media print {
  .no-print,
  .adsbygoogle,
  .google-auto-placed,
  iframe[id^="google_ads"] {
    display: none !important;
  }
}
