* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* sidenote-pdf系と共通のデザイントークン（templex.jp実測分） */
:root {
  --tx-text: #0a0a0a;
  --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);
  --accent: #1a73e8;
  --danger: #d33;
}
body {
  margin: 0; color: var(--tx-text); background: #fff;
  font-family: "Source Sans Pro", system-ui, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  padding: 40px 20px 80px;
}
.wrap { max-width: 640px; margin: 0 auto; }

.page-title { font-size: 26px; font-weight: 700; margin: 0 0 8px; letter-spacing: -.3px; }
.page-desc { font-size: 15px; color: var(--tx-muted); margin: 0 0 32px; line-height: 1.7; }

.card {
  border: 1px solid var(--tx-border); border-radius: var(--tx-radius-card);
  box-shadow: var(--tx-shadow-sm); background: #fff; padding: 24px; margin-bottom: 16px;
}

/* ── ファイル選択（ドロップゾーン） ── */
.dropzone {
  border: 2px dashed var(--tx-border); border-radius: 10px; padding: 40px 20px;
  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: 48px; height: 48px; color: var(--tx-muted-2); margin-bottom: 14px; }
.dropzone p { margin: 0; font-size: 17px; font-weight: 600; color: var(--tx-text); line-height: 1.6; }
.dropzone-sub { display: block; font-size: 13px; font-weight: 400; color: var(--tx-muted-2); margin-top: 4px; }
.dropzone .filename { font-size: 16px; font-weight: 600; color: var(--tx-text); margin-top: 10px; }
.dropzone input[type="file"] { display: none; }

/* ── 詳しい項目（作成アプリ・作成日など、普段は畳んでおく） ── */
.advanced { margin-top: 20px; border-top: 1px solid var(--tx-border); padding-top: 16px; }
.advanced summary {
  cursor: pointer; font-size: 13.5px; color: var(--tx-muted); font-weight: 500; list-style: none;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "▸ "; color: var(--tx-muted-2); }
.advanced[open] summary::before { content: "▾ "; }
.advanced[open] summary { margin-bottom: 4px; }

/* ── 項目編集フォーム ── */
.msec { font-size: 13px; font-weight: 700; color: var(--tx-text); margin: 0 0 12px; }
.field-group { margin-top: 20px; }
.field-label { font-size: 13.5px; color: var(--tx-text); margin: 0 0 6px; }
.field-hint-plain { font-size: 11.5px; color: var(--tx-muted-2); margin: 6px 0 0; line-height: 1.6; }
.field-hint { font-size: 11.5px; color: var(--tx-muted); margin: 10px 0 0; }
.text-input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--tx-radius-btn);
  border: 1px solid var(--tx-border); font-size: 14px; font-family: inherit;
  background: #fff; color: var(--tx-text);
}
.text-input:focus { outline: none; border-color: var(--tx-text); box-shadow: 0 0 0 3px rgba(10,10,10,.08); }
.text-input::placeholder { color: #b7bac2; }

/* ── 参考情報（作成日・更新日） ── */
.readonly-info { border-top: 1px solid var(--tx-border); padding-top: 16px; }
.info-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 4px 0; }
.info-row .info-label { color: var(--tx-muted); }
.info-row .info-value { color: var(--tx-text); text-align: right; overflow-wrap: anywhere; }

.actions-row { margin-top: 18px; }

/* ── ボタン共通 ── */
.btn-outline, .btn-primary {
  font-size: 14px; height: 40px; padding: 0 18px; 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; font-family: inherit;
}
.btn-outline { background: #fff; color: var(--tx-text); border: 1px solid var(--tx-border); width: 100%; }
.btn-outline:hover { background: var(--tx-bg-muted); }
.btn-primary { background: var(--tx-text); color: #fff; border: 1px solid var(--tx-text); }
.btn-primary:hover { background: #262626; }
.btn-primary:disabled, .btn-outline:disabled { background: #f5f6f8; color: #b7bac2; border-color: #eee; cursor: not-allowed; }
.icon { width: 1.05em; height: 1.05em; flex: none; }

/* 一番押してほしい操作なので、幅いっぱい・大きめにして迷わせない */
.btn-big { width: 100%; height: 52px; font-size: 16px; font-weight: 600; }

/* ── 結果 ── */
.result-summary { margin: 0 0 16px; font-size: 14px; color: var(--tx-muted); }
.result-row { display: flex; flex-direction: column; gap: 10px; }
.result-item {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid var(--tx-border); border-radius: 10px; padding: 12px 16px;
  text-decoration: none; color: inherit; cursor: pointer;
}
.result-item:hover { background: var(--tx-bg-muted); }
.result-item-label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.result-item-label .icon { width: 18px; height: 18px; color: var(--tx-muted-2); }
.reset-row { margin-top: 20px; text-align: center; }

/* ── エラー ── */
.error-card { border-color: #f3c9c9; background: #fff7f7; }
.error-card p { margin: 0; font-size: 14px; color: var(--danger); }

/* ── 免責事項 ── */
.disclaimer-title { font-size: 13px; font-weight: 700; color: var(--tx-text); margin: 0 0 10px; }
.disclaimer-text { font-size: 12px; color: var(--tx-muted-2); margin: 0 0 6px; line-height: 1.7; }
.disclaimer-text:last-child { margin-bottom: 0; }

.footer-note { font-size: 12px; color: var(--tx-muted-2); text-align: center; margin-top: 24px; line-height: 1.7; }

@media (max-width: 500px) {
  body { padding: 24px 16px 60px; }
  .card { padding: 18px; }
  .info-row { flex-direction: column; gap: 2px; }
  .info-row .info-value { text-align: left; }
}
