﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600&family=Noto+Sans+Mono:wght@400;600&display=swap');

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #d9d9d9;
  --accent: #111111;
  --accent-soft: #f3f3f3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  color: var(--text);
  background-color: var(--bg);
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.eyebrow {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.hero h1 {
  font-size: clamp(1.8rem, 2.6vw, 2.3rem);
  margin: 0 0 10px;
  font-weight: 600;
}

.lede {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.btn {
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--accent);
  color: #ffffff;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: #000000;
  border-color: #000000;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn.ghost {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}

.btn.small {
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 6px;
}

.workspace {
  margin-top: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 420px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.panel-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.tool {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tool:hover {
  background: #ffffff;
  border-color: #cfcfcf;
}

.tool.is-active {
  background: #1f1f1f;
  border-color: #1f1f1f;
  color: #ffffff;
}

.editor {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  background: #ffffff;
  font-size: 1rem;
  line-height: 1.7;
  overflow-y: auto;
  min-height: 380px;
}

.editor:focus {
  outline: 2px solid rgba(17, 17, 17, 0.3);
  outline-offset: 2px;
}

.editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.editor code.inline-code {
  font-family: 'Noto Sans Mono', ui-monospace, SFMono-Regular, monospace;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.95em;
}

.editor pre {
  font-family: 'Noto Sans Mono', ui-monospace, SFMono-Regular, monospace;
  background: #f4f4f4;
  color: #111111;
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
}

.editor blockquote {
  border-left: 3px solid #c7c7c7;
  padding-left: 12px;
  margin: 8px 0;
  color: #444444;
}

.editor .spoiler {
  background: #f2f2f2;
  color: #111111;
  border-radius: 6px;
  padding: 2px 8px;
  position: relative;
  border: 2px solid #9b9b9b;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.editor .spoiler::before {
  content: "ネタバレ";
  display: inline-block;
  font-size: 0.72em;
  font-weight: 700;
  background: #5f5f5f;
  color: #ffffff;
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 8px;
  vertical-align: middle;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.sample-render.spoiler {
  background: #111111;
  color: #ffffff;
  border-radius: 4px;
  padding: 2px 6px;
  display: inline-block;
}

.output {
  display: block;
  width: 100%;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.output.is-hidden {
  display: none;
}

.tips {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tips h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.tips-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.tip-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  min-height: 110px;
}

.tip-card h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.tip-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.sample-line {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.sample-line code {
  font-family: 'Noto Sans Mono', ui-monospace, SFMono-Regular, monospace;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
}

.sample-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.sample-render {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
}

.sample-render.bold {
  font-weight: 700;
}

.sample-render.italic {
  font-style: italic;
}

.sample-render.underline {
  text-decoration: underline;
}

.sample-render.strike {
  text-decoration: line-through;
}

.sample-render.spoiler {
  background: #111111;
  color: #ffffff;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
}

.sample-render.inline-code {
  font-family: 'Noto Sans Mono', ui-monospace, SFMono-Regular, monospace;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.sample-render.heading {
  font-weight: 700;
  font-size: 1.1rem;
}

.sample-block {
  margin: 0;
  padding: 10px;
  background: #f4f4f4;
  border-radius: 6px;
  font-family: 'Noto Sans Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 0.85rem;
  color: #111111;
}

.sample-quote {
  margin: 0;
  padding-left: 10px;
  border-left: 3px solid #c7c7c7;
  color: #444444;
}

.sample-list {
  margin: 0;
  padding-left: 18px;
  color: #444444;
}

@media (max-width: 960px) {
  .toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 16px;
  }

  .panel {
    padding: 14px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}




