@charset "utf-8";

/* 版下工房
 * 見た目の方針：印刷所の入稿指示書。
 * 角丸は使わない（トンボは直線でできている）。影も使わない。
 * 色は紙色・墨・朱の三色だけ。グラデーションは一切なし。
 */

:root {
  color-scheme: light;

  --paper:      #e8e3d6;
  --paper-deep: #ddd6c4;
  --sheet:      #fcfaf4;

  --ink:    #191712;
  --ink-2:  #5c564a;
  --ink-3:  #97907e;

  --rule:        #d7cfbc;
  --rule-strong: #b6ac93;

  --shu:      #bf3b2b;
  --shu-deep: #97291b;
  --shu-wash: #f6e8e3;

  --mincho: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Noto Serif JP", "MS PMincho", serif;
  --gothic: "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Roboto Mono", monospace;

  --w: 1160px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 14px;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
}

/* 罫線の交差を印刷物らしく見せるための地の線 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--paper-deep) 1px, transparent 1px) 0 0 / 100% 32px;
  opacity: .28;
  z-index: 0;
}

/* ---------------- 見出し部 ---------------- */

.masthead {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--sheet);
}
.masthead__inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 34px 24px 26px;
}

.wordmark { display: flex; align-items: baseline; gap: 14px; }
.wordmark__ja {
  font-family: var(--mincho);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .22em;
  line-height: 1.2;
}
.wordmark__en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--shu);
  border-left: 1px solid var(--rule-strong);
  padding-left: 14px;
}

.masthead__lead {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.95;
  max-width: 44em;
}
.masthead__lead em {
  font-style: normal;
  border-bottom: 2px solid var(--shu-wash);
  box-shadow: inset 0 -6px 0 var(--shu-wash);
}
.masthead__note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--ink-2);
  padding-left: 13px;
  border-left: 3px solid var(--shu);
}

/* ---------------- モード切替 ---------------- */

/* 見出し部と同じく、地は全幅・中身は版面幅に揃える */
.modes {
  position: relative;
  z-index: 1;
  background: var(--sheet);
  border-bottom: 1px solid var(--rule-strong);
}
.modes__inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
}
.mode {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  font-family: inherit;
  color: var(--ink-2);
  text-align: left;
  padding: 14px 26px 13px 18px;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 11px;
  row-gap: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.mode:hover { background: #f5f1e7; }
.mode__no {
  grid-row: 1 / 3;
  align-self: center;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink-3);
  letter-spacing: .06em;
}
.mode__name { font-size: 14.5px; line-height: 1.5; }
.mode__desc { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.mode.is-active {
  color: var(--ink);
  border-bottom-color: var(--shu);
  background: var(--sheet);
}
.mode.is-active .mode__no { color: var(--shu); }
.mode.is-active .mode__name { font-weight: 700; }

/* ---------------- 版面 ---------------- */

.layout {
  position: relative;
  z-index: 1;
  max-width: var(--w);
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 28px;
  align-items: start;
}

/* 用紙。四隅に角トンボを置く */
.sheet {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  padding: 30px 34px 26px;
}
.sheet__marks {
  position: absolute;
  inset: 7px;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23bf3b2b' stroke-width='1' d='M0 .5H16M0 4.5H16M.5 0V16M4.5 0V16'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23bf3b2b' stroke-width='1' d='M24 .5H8M24 4.5H8M23.5 0V16M19.5 0V16'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23bf3b2b' stroke-width='1' d='M0 23.5H16M0 19.5H16M.5 24V8M4.5 24V8'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23bf3b2b' stroke-width='1' d='M24 23.5H8M24 19.5H8M23.5 24V8M19.5 24V8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left top, right top, left bottom, right bottom;
  background-size: 20px 20px;
  opacity: .75;
}

/* ---------------- 各項目 ---------------- */

.block { padding: 0 0 22px; }
.block + .block { border-top: 1px solid var(--rule); padding-top: 22px; }

.block__head {
  font-family: var(--mincho);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .06em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.block__no {
  font-family: var(--gothic);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #fff;
  background: var(--shu);
  padding: 3px 8px 2px;
  line-height: 1.6;
}

.subhead {
  font-family: var(--mincho);
  font-size: 14px;
  font-weight: 600;
  margin: 20px 0 10px;
  padding-left: 10px;
  border-left: 2px solid var(--rule-strong);
}

/* 投入口 */
.drop {
  border: 1px dashed var(--rule-strong);
  background: #faf7ef;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: background .12s linear, border-color .12s linear;
}
.drop:hover, .drop:focus-visible { background: var(--shu-wash); border-color: var(--shu); outline: none; }
.drop.is-over { background: var(--shu-wash); border-color: var(--shu); border-style: solid; }
.drop__main { margin: 0; font-family: var(--mincho); font-size: 16px; letter-spacing: .05em; }
.drop__sub { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); }

.filemeta { margin: 16px 0 0; display: grid; gap: 0; }
.filemeta > div {
  display: grid;
  grid-template-columns: 8em 1fr;
  border-bottom: 1px dotted var(--rule-strong);
  padding: 5px 0;
}
.filemeta dt { color: var(--ink-2); font-size: 12.5px; margin: 0; }
.filemeta dd { margin: 0; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }

/* 入力欄。枠で囲わず下線だけにする */
.field { display: block; margin: 0 0 12px; }
.field__label {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: .08em;
  margin-bottom: 3px;
}
.field select,
.field input[type="number"] {
  appearance: none;
  width: 100%;
  border: 0;
  border-bottom: 1.5px solid var(--rule-strong);
  background: transparent;
  font-family: var(--gothic);
  font-size: 14.5px;
  color: var(--ink);
  padding: 5px 2px;
  border-radius: 0;
}
.field select {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23bf3b2b' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 9px 5px;
  padding-right: 20px;
}
.field select:focus,
.field input:focus { outline: none; border-bottom-color: var(--shu); }

.field__unit { display: flex; align-items: baseline; gap: 5px; }
.field__unit input { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.field__unit i { font-style: normal; font-size: 11.5px; color: var(--ink-3); }

.field-row { display: flex; gap: 20px; flex-wrap: wrap; }
.field--sm { flex: 0 1 108px; }

/* 選択肢 */
.choices { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.choice {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 4px 11px 2px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.choice:hover { background: #f7f3ea; }
.choice input { margin: 6px 0 0; accent-color: var(--shu); flex: none; }
.choice__body { display: block; }
.choice__body b { display: block; font-size: 14px; font-weight: 700; line-height: 1.7; }
.choice__body i {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.75;
}
.choice:has(input:checked) { background: var(--shu-wash); }
.choice:has(input:checked) .choice__body b { color: var(--shu-deep); }

.check { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; cursor: pointer; }
.check input { margin: 6px 0 0; accent-color: var(--shu); flex: none; }

/* 背幅の計算結果。伝票の計算欄のように見せる */
.calc {
  margin: 16px 0 18px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 12px 2px 11px;
}
.calc__formula {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  letter-spacing: .01em;
}
.calc__result {
  margin: 6px 0 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mincho);
  color: var(--shu-deep);
}
.calc__result span {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.calc__result i { font-style: normal; font-size: 14px; }
.calc__note { margin: 7px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-3); }

input[type="color"] {
  appearance: none;
  width: 100%;
  height: 30px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  padding: 2px;
  border-radius: 0;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; }

/* 印刷所の仕様表示 */
.policy {
  margin-top: 14px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink);
  background: #faf7ef;
  padding: 13px 15px 12px;
}
.policy__badge {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 2px 9px 1px;
  line-height: 1.7;
}
.policy__badge[data-tone="ok"]   { background: var(--ink);  color: #fdfcf8; }
.policy__badge[data-tone="warn"] { background: transparent; color: var(--ink); border: 1px solid var(--rule-strong); }
.policy__badge[data-tone="need"] { background: var(--shu);  color: #fff; }

.policy__note { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--ink-2); }

.policy__spec { margin: 11px 0 0; }
.policy__spec > div {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  padding: 3px 0;
  border-top: 1px dotted var(--rule-strong);
}
.policy__spec dt { margin: 0; font-size: 11.5px; color: var(--ink-3); }
.policy__spec dd { margin: 0; font-size: 12.5px; line-height: 1.75; }

.policy__src { margin: 10px 0 0; font-size: 11.5px; line-height: 1.7; }
.policy__src a { color: var(--shu-deep); text-decoration: underline; text-underline-offset: 2px; }
.policy__src a:hover { color: var(--shu); }
.policy__src span { color: var(--ink-3); display: block; }

.hint {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.8;
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--rule-strong);
}
.hint b { color: var(--ink); }

/* 実行 */
.actions {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.btn {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: var(--shu);
  color: #fff;
  font-family: var(--mincho);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .16em;
  padding: 13px 34px;
  cursor: pointer;
  transition: background .12s linear;
}
.btn:hover:not(:disabled) { background: var(--shu-deep); }
.btn:disabled { background: var(--rule-strong); color: #fdfcf8; cursor: not-allowed; }
.actions__state { margin: 0; font-size: 12.5px; color: var(--ink-2); font-family: var(--mono); }
.actions__state.is-err { color: var(--shu-deep); font-family: var(--gothic); }

/* ---------------- 右側 ---------------- */

.side { display: grid; gap: 20px; position: sticky; top: 20px; }

.panel { background: var(--sheet); border: 1px solid var(--rule-strong); padding: 18px 20px 20px; }
.panel--quiet { background: transparent; border-style: dashed; }
.panel__head {
  font-family: var(--mincho);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.preview {
  background:
    repeating-conic-gradient(#eeeae0 0% 25%, #f8f5ee 0% 50%) 0 0 / 14px 14px;
  border: 1px solid var(--rule);
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.preview canvas { max-width: 100%; height: auto; display: block; background: #fff; }
.preview__empty { margin: 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }

.spec { margin: 14px 0 0; }
.spec > div {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  padding: 4px 0;
  border-bottom: 1px dotted var(--rule-strong);
}
.spec dt { font-size: 12px; color: var(--ink-2); margin: 0; }
.spec dd { margin: 0; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.warn { margin: 14px 0 0; padding: 0 0 0 16px; list-style: none; }
.warn li {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--shu-deep);
  position: relative;
  margin-bottom: 7px;
}
.warn li::before {
  content: "※";
  position: absolute;
  left: -16px;
}

/* チェック結果 */
.field-row--tight { gap: 14px; margin-bottom: 2px; }

.results { margin: 14px 0 0; padding: 0; list-style: none; }
.results__empty { font-size: 12.5px; color: var(--ink-3); }

.result {
  padding: 9px 0 10px 12px;
  border-top: 1px solid var(--rule);
  border-left: 3px solid var(--rule-strong);
  margin-bottom: 0;
}
.result:last-child { border-bottom: 1px solid var(--rule); }
.result[data-level="error"] { border-left-color: var(--shu); }
.result[data-level="ok"] { border-left-color: var(--rule); }
.result[data-level="busy"] { border-left-color: var(--rule); color: var(--ink-3); }

.result__head {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}
.result[data-level="ok"] .result__head { font-weight: 400; color: var(--ink-2); }

.result__tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 1px 6px 0;
  margin-right: 7px;
  vertical-align: 1px;
  line-height: 1.7;
}
.result[data-level="error"] .result__tag { background: var(--shu); color: #fff; }
.result[data-level="warn"] .result__tag { background: var(--ink); color: #fdfcf8; }
.result[data-level="ok"] .result__tag {
  background: transparent;
  color: var(--ink-3);
  border: 1px solid var(--rule-strong);
  font-weight: 400;
}

.result__detail {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
}

.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
  padding: 6px 0 6px 18px;
  border-bottom: 1px dotted var(--rule-strong);
  position: relative;
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-left: 1px solid var(--shu);
  border-bottom: 1px solid var(--shu);
}

/* ---------------- 解説 ---------------- */

.notes {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule-strong);
  background: var(--sheet);
}
.notes__inner { max-width: var(--w); margin: 0 auto; padding: 34px 24px 30px; }
.notes__head {
  font-family: var(--mincho);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .12em;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.notes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(276px, 1fr));
  gap: 0 34px;
}
.notes__grid article {
  padding: 14px 0 16px;
  border-bottom: 1px dotted var(--rule-strong);
}
.notes__grid h3 {
  font-family: var(--mincho);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  padding-left: 12px;
  border-left: 3px solid var(--shu);
  line-height: 1.6;
}
.notes__grid p {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-2);
}
.notes__grid b { color: var(--ink); }
.notes__caveat {
  margin: 20px 0 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-3);
  padding-left: 13px;
  border-left: 3px solid var(--rule-strong);
}

/* ---------------- 広告枠 ---------------- */

/* 広告そのものはiframeで別レイアウトを持ち込むので、枠は最小限にして
   「印刷所の入稿指示書」という世界観を壊さないようにする */
.ad-slot {
  border: 1px dashed var(--rule-strong);
  padding: 6px 10px 10px;
  background: var(--sheet);
}
.ad-slot__label {
  margin: 0 0 6px;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
}
.ad-slot--banner {
  position: relative;
  z-index: 1;
  max-width: var(--w);
  margin: 0 auto;
  border-left: 0;
  border-right: 0;
}

/* ---------------- 奥付 ---------------- */

.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule-strong);
  background: var(--sheet);
}
.foot__inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: baseline;
  justify-content: space-between;
}
.foot p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .08em;
}
.foot__links a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.foot__links a:hover { color: var(--shu-deep); }

/* ---------------- 単独ドキュメントページ（プライバシーポリシー等） ---------------- */

.layout--doc { max-width: 760px; margin: 0 auto; padding: 34px 24px 60px; }
.doc .block { padding-bottom: 26px; }
.doc .block + .block { margin-top: 4px; }
.doc p { font-size: 13.5px; line-height: 2; color: var(--ink-2); margin: 0 0 12px; }
.doc a { color: var(--shu-deep); text-decoration: underline; text-underline-offset: 2px; }
.doc__updated { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

/* ---------------- 幅の狭い画面 ---------------- */

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .sheet { padding: 24px 20px 20px; }
  .modes__inner { flex-wrap: wrap; padding: 0 20px; }
  .mode { flex: 1 1 100%; border-right: 0; border-bottom-width: 2px; }
  .wordmark { flex-wrap: wrap; gap: 8px; }
  .wordmark__en { border-left: 0; padding-left: 0; }
}
