/* 色はここでまとめて変えられます */
:root {
  --bg: #efefef;
  --card: #fafafa;
  --line: #d6d6d6;
  --text: #262626;
  --muted: #6e6e6e;
  --accent: #4d4d4d;
  --focus: #8f8f8f;
  --disabled: #a6a6a6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

.page { max-width: 640px; margin: 0 auto; padding: 32px 16px 64px; }

h1 { margin: 0 0 8px; font-size: 28px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
h2 { margin: 0 0 12px; font-size: 20px; }
.lead { margin: 0; }
.note { margin: 4px 0 20px; color: var(--muted); font-size: 13px; }
.note-top { margin-bottom: 0; }
.parody { margin-top: 0; }
.parody a { color: var(--text); font-weight: 700; }
.counter { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.counter strong { color: var(--text); font-size: 22px; }

.prompt-list { display: grid; gap: 8px; }

.prompt-card {
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.prompt-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.prompt-title span { color: var(--muted); }

.add-button {
  width: 100%;
  min-height: 40px;
  background: transparent;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.add-button:hover { background: #ececec; }

.video-row { display: flex; align-items: center; gap: 12px; }
.video-thumb {
  flex: none;
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dcdcdc;
  border-radius: 4px;
}
.video-text { flex: 1; min-width: 0; }
.video-title { margin: 0; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.video-creator { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.video-actions { display: flex; flex-direction: column; flex: none; align-items: flex-end; }

.text-button {
  padding: 2px;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.editor { display: grid; gap: 10px; }
.field { display: block; }
.field-label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 700; }

input[type="text"], input[type="url"], textarea {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 0; }
input::placeholder, textarea::placeholder { color: #8c8c8c; }

.editor-actions { display: flex; gap: 8px; }
.editor-actions .button { flex: 1; }
.editor-image { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.hint { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.hint.error { color: #8a2c2c; }
.center { text-align: center; }

.profile { display: grid; gap: 16px; margin: 24px 0; padding-top: 0; }
.icon-row { display: flex; align-items: center; gap: 12px; }
.icon-preview {
  display: grid;
  flex: none;
  place-items: center;
  width: 60px;
  height: 60px;
  overflow: hidden;
  background: #dfdfdf;
  border-radius: 50%;
  font-size: 22px;
}
.icon-preview img { width: 100%; height: 100%; object-fit: cover; }

.button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.button-primary:hover { background: #333; }
.button-primary:disabled { background: var(--disabled); border-color: var(--disabled); cursor: not-allowed; }
.button-outline { background: var(--card); border: 1px solid var(--accent); color: var(--text); }
.button-outline:hover { background: #ececec; }
.button-grow { flex: 1; width: auto; }
#make { min-height: 52px; font-size: 18px; }

.result { display: grid; gap: 10px; margin-top: 28px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.result img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }

.reset { display: block; margin: 32px auto 0; color: var(--muted); font-weight: 400; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
label:has(.visually-hidden:focus-visible) { outline: 3px solid var(--focus); }
