* { box-sizing: border-box; }
/* sidenote（サイドノート作成ツール）と同じデザイントークン・ヒーロー構成。 */
:root {
  --tx-text: #1e2126;
  --tx-muted: #4d4d4d;
  --tx-muted-2: #71717a;
  --tx-border: #e5e5e5;
  --tx-bg-muted: #f2f2f2;
  --tx-radius-card: 14px;
  --tx-radius-btn: 8px;
  --tx-shadow-sm: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --tx-shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --tx-shadow-2xl: 0 25px 50px -12px rgba(0,0,0,.25);
  --danger: #d92d20;
  --accent: #ff4b4b;
}
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--tx-text); background: #f4f5f7; padding: 28px 40px 100px;
  font-family: "Source Sans Pro", system-ui, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
.icon { width: 1em; height: 1em; flex: none; }

/* ── ヒーロー ── */
.hero {
  width: 100vw; position: relative; left: 50%; margin: -28px 0 0 -50vw;
  padding: 72px 40px 48px; background: #eef0f3; border-bottom: 1px solid var(--tx-border);
}
.hero-inner {
  max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: start;
}
.hero-title { font-size: 38px; font-weight: 700; line-height: 1.28; letter-spacing: -.5px; margin: 0 0 18px; }
.hero-desc { font-size: 22px; line-height: 1.7; color: var(--tx-muted); margin: 0 0 28px; max-width: 18em; }
.hero-shortcuts { margin-top: 20px; }
.hero-shortcuts-title { font-size: 12px; font-weight: 600; color: var(--tx-muted-2); margin-bottom: 6px; }
.hero-shortcuts ul { list-style: none; margin: 0; padding: 0; font-size: 12.5px; line-height: 1.9; color: var(--tx-muted); }
.hero-shortcuts li::before { content: "・"; }

/* 「機能」ボタン群（sidenoteの「デザイン」グリッドと同じ見た目・同じ位置） */
.hero-theme-section { margin-top: 28px; }
.hero-theme-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.hero-theme-title { font-size: 16px; font-weight: 700; }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-width: 460px; }
.theme-swatch {
  height: 40px; border: 1px solid var(--tx-border); background: var(--tx-bg-muted); border-radius: var(--tx-radius-btn);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--tx-text); cursor: pointer; text-align: center;
  box-shadow: var(--tx-shadow-sm); transition: box-shadow .15s, background .15s; padding: 0 8px;
}
.theme-swatch:hover { background: #e8e8ea; box-shadow: var(--tx-shadow-md); }
.theme-swatch.selected { background: var(--tx-text); color: #fff; border-color: var(--tx-text); font-weight: 700; }
.theme-swatch:focus-visible { outline: 2px solid var(--tx-text); outline-offset: 2px; }

/* ── アプリのイメージ図 ── */
.browser-mock {
  border: 1px solid var(--tx-border); border-radius: var(--tx-radius-card); overflow: hidden;
  background: #fff; box-shadow: var(--tx-shadow-2xl);
}
.browser-mock-bar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #f3f3f3; border-bottom: 1px solid var(--tx-border); }
.browser-mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-red { background: #ff5f57; } .dot-yellow { background: #ffbd2e; } .dot-green { background: #28c840; }
.browser-mock-url {
  margin-left: 10px; font-size: 11.5px; color: var(--tx-muted-2); background: #fff;
  border: 1px solid var(--tx-border); border-radius: 999px; padding: 3px 12px; flex: 1 1 auto;
}
.browser-mock-body { background: var(--tx-bg-muted); padding: 22px; }

/* ── ボタン共通 ── */
.btn-outline, .btn-primary {
  font: inherit; font-size: 14px; height: 40px; padding: 0 16px; border-radius: var(--tx-radius-btn);
  font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; text-decoration: none; white-space: nowrap;
}
.btn-outline { background: #fff; color: var(--tx-text); border: 1px solid var(--tx-border); }
.btn-outline:hover:not(:disabled) { background: #f4f4f5; }
.btn-primary { background: var(--tx-text); color: #fff; border: 1px solid var(--tx-text); }
.btn-primary:hover:not(:disabled) { background: #262626; }
.btn-outline:disabled, .btn-primary:disabled { background: #f5f6f8; color: #b7bac2; border-color: #eee; cursor: not-allowed; }
button:focus-visible, .filebtn:focus-within, .dropzone:focus-within { outline: 2px solid var(--tx-text); outline-offset: 2px; }

/* ── 本文 ── */
.workspace { max-width: 1100px; margin: 32px auto 0; }
.tool-panel { display: flex; flex-direction: column; gap: 16px; }
.panel-title { font-size: 22px; font-weight: 700; margin: 0; }
.panel-lead { font-size: 13.5px; color: var(--tx-muted); margin: -8px 0 0; line-height: 1.7; }

.card {
  background: #fff; border: 1px solid var(--tx-border); border-radius: var(--tx-radius-card);
  box-shadow: var(--tx-shadow-sm); padding: 18px 20px;
}
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar-sep { width: 1px; align-self: stretch; background: var(--tx-border); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, .field-label { font-size: 12px; font-weight: 600; color: var(--tx-muted-2); }
.text-input, select.text-input, textarea.text-input {
  font: inherit; font-size: 14px; height: 40px; padding: 0 12px; border: 1px solid var(--tx-border);
  border-radius: var(--tx-radius-btn); background: #fff; color: var(--tx-text); width: 100%;
}
textarea.text-input { height: auto; padding: 8px 12px; resize: vertical; line-height: 1.5; }
.text-input:focus { outline: 2px solid var(--tx-text); outline-offset: 0; border-color: var(--tx-text); }
input[type="range"] { accent-color: var(--tx-text); width: 130px; }
input[type="color"] { width: 40px; height: 40px; padding: 2px; border: 1px solid var(--tx-border); border-radius: var(--tx-radius-btn); background: #fff; cursor: pointer; }
.cap { font-size: 12.5px; color: var(--tx-muted-2); margin: 0; line-height: 1.6; }
.status { font-size: 13px; color: var(--tx-muted); margin: 0; min-height: 20px; line-height: 1.6; }
.status.is-error, .is-error-text { color: var(--danger); }
.badge { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--tx-border); background: #fff; color: #555; white-space: nowrap; }
.badge.ok { background: #e8f5e9; border-color: #c8e6c9; color: #256029; }
.badge.warn { background: #fff4e5; border-color: #ffe0b2; color: #8a5300; }

/* ドロップゾーン */
.dropzone {
  border: 2px dashed var(--tx-border); border-radius: 10px; padding: 30px 20px; background: #fff;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s; display: block;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--tx-text); background: var(--tx-bg-muted); }
.dropzone .icon-lg { width: 40px; height: 40px; color: var(--tx-muted-2); margin-bottom: 10px; }
.dropzone p { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.6; }
.dropzone-sub { display: block; font-size: 13px; font-weight: 400; color: var(--tx-muted-2); margin-top: 4px; }
.dropzone input[type="file"] { display: none; }
.filebtn input { display: none; }

/* ── フッター（このツールについて／免責事項） ── */
.site-info { max-width: 1100px; margin: 48px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.site-info .shead { font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.site-info .cap { margin-bottom: 4px; }
.link { font-size: 13px; color: #1f6feb; text-decoration: none; }
.link:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-title { font-size: 30px; }
  .site-info { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { padding-left: 16px; padding-right: 16px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .theme-grid { max-width: none; }
  .page-card { width: calc(50% - 8px); }
  .toolbar-sep { display: none; }
}

/* ── meishi 固有 ── */
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--tx-text); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--tx-text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .spanall { grid-column: 1 / -1; }
.field { min-width: 0; }
.sub-title { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.sub-title + .cap { margin-top: -6px; margin-bottom: 10px; }
.hr { border: none; border-top: 1px solid var(--tx-border); margin: 18px 0; }

/* 画像スロット */
.imgslot { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.filebtn { cursor: pointer; }
.slot-thumb { height: 40px; max-width: 80px; object-fit: contain; border: 1px solid var(--tx-border); border-radius: 6px; background: #fff; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; }

/* 色 */
.swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.color-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--tx-border); cursor: pointer; padding: 0; }
.color-dot.selected { box-shadow: 0 0 0 2px var(--tx-text); }

/* QRスロット */
.qr-slot { border: 1px solid var(--tx-border); border-radius: 10px; padding: 14px; background: #fcfcfd; }

/* デザイン選択(ヒーロー内・裏面) */
.theme-grid.three { grid-template-columns: repeat(3, 1fr); max-width: 520px; }
.theme-grid.two { grid-template-columns: repeat(2, 1fr); max-width: 520px; }

/* カードのプレビュー */
.mock-cards { display: flex; flex-direction: column; gap: 14px; }
.mock-card-wrap { position: relative; }
.mock-card-tag { position: absolute; top: -9px; left: 10px; font-size: 11px; font-weight: 700; color: var(--tx-muted-2); background: var(--tx-bg-muted); padding: 0 6px; z-index: 1; }
.cv-card { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.18); background: #fff; }
.card-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; max-width: 760px; }
.sheet-preview { display: flex; flex-wrap: wrap; gap: 20px; }
.sheet-fig { margin: 0; }
.sheet-fig canvas { display: block; width: 300px; max-width: 100%; height: auto; box-shadow: 0 2px 12px rgba(0,0,0,.18); background: #fff; }
.sheet-fig figcaption { font-size: 12px; color: var(--tx-muted-2); margin-top: 6px; }
.out-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
progress { width: 100%; height: 8px; margin-top: 12px; accent-color: var(--tx-text); }
.warn-text { color: #8a5300; }
