:root {
  /* 連携元(JTNマップ/登記簿図書館 管理者・請求代行サイト)の配色に合わせたトークン */
  --bg: #f6b97d;              /* 外周の背景(ピーチオレンジ) */
  --surface: #ffffff;          /* 白いコンテンツカード */
  --surface-sunken: #fdecc8;   /* クリーム色(ボタン・タブ・テーブルの帯) */
  --ink: #24252f;              /* 見出しの濃紺〜黒 */
  --ink-soft: #5c5a52;
  --ink-faint: #96938a;
  --accent: #ea8c3a;           /* オレンジ(ボタン・強調) */
  --accent-strong: #d67725;    /* 濃いオレンジ(ホバー等) */
  --accent-soft: #fdecc8;      /* 淡いオレンジ/クリーム */
  --line: #f0d9b6;             /* 暖色系の罫線・ボーダー */
  --divider: #ec1e79;          /* セクション区切りのピンク */
  --stamp: #a8382c;
  --stamp-soft: #f4e2df;
  --shadow: 0 1px 2px rgba(35,36,31,0.06), 0 8px 24px -12px rgba(35,36,31,0.18);
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
/*
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.28) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.28) 0 2px, transparent 2px 14px);
*/
    background: url(../img/bg.png);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

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

.eyebrow {
  display: block;
  font-size: 36px; letter-spacing: 0.01em; color: var(--accent);
  font-weight: 700; margin-bottom: 4px;
}

h1 { font-size: 22px; margin: 4px 0 0; font-weight: 700; }

.rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 28px 0 24px; }
.step {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.step.current { background: var(--surface-sunken); border-color: var(--accent); }
.step-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--surface-sunken); color: var(--ink-soft);
}
.step.current .step-num { background: var(--accent); color: #fff; }
.step-title { font-size: 13px; font-weight: 700; }

.frame {
  background: var(--surface); 
/*
    border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); 
*/
    padding: 28px;
}

.screen-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  margin-bottom: 22px; padding-bottom: 18px; border-bottom: 2px solid var(--divider);
}
.screen-head h2 { margin: 0 0 4px; font-size: 18px; }
.screen-head p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.params { font-size: 11.5px; color: var(--ink-faint); text-align: right; line-height: 1.6; white-space: nowrap; }

table.roster { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.roster th {
  text-align: left; font-size: 11px; color: var(--ink-faint); font-weight: 700;
  padding: 0 10px 10px; border-bottom: 1px solid var(--line);
}
table.roster td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.roster tr.selected td { background: var(--accent-soft); }
table.roster tr.disabled td { color: var(--ink-faint); background: var(--surface-sunken); }
table.roster tr.disabled input[type="radio"] { cursor: not-allowed; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 100px; background: var(--surface-sunken); color: var(--ink-faint);
}
.badge.sent { background: var(--stamp-soft); color: var(--stamp); }

.tpl-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tpl-tab {
  display: inline-block; border: 2px solid var(--accent); background: var(--surface);
  color: var(--accent-strong); font-size: 12.5px; font-weight: 700; padding: 8px 16px;
  border-radius: 100px; text-decoration: none;
}
.tpl-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.field-label {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint);
  font-weight: 700; margin-bottom: 8px; display: block;
}
textarea.compose {
  width: 100%; min-height: 300px; resize: vertical; border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; font-size: 14.5px; line-height: 1.9;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; background: var(--surface); color: var(--ink);
}
.counter { text-align: right; margin-top: 6px; font-size: 12px; color: var(--ink-faint); }
.counter.warn { color: var(--stamp); font-weight: 700; }

.editor-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.chip-list { display: flex; flex-direction: column; gap: 8px; }
.chip-row {
  display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; background: var(--surface-sunken);
}
.chip-row .k { color: var(--ink-faint); }
.chip-row .v { font-weight: 600; text-align: right; }

.cards-row { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; margin: 8px 0 24px; }
.card-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.card-caption { font-size: 11.5px; color: var(--ink-faint); }
.postcard {
  /* 実寸100×148mmと同じ比率(148/100)。裏面が全角25文字/行で折り返せるだけの幅を確保している */
  width: 360px; height: 533px; border: 1px solid var(--line); border-radius: 3px;
  box-shadow: var(--shadow); background: #fffdf8;
}
.postcard.front img { width: 100%; height: 100%; object-fit: contain; }
.postcard.back {
  padding: 24px 20px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 12px;
  line-height: 1.95; white-space: pre; overflow-x: hidden; overflow-y: auto;
}

.recap {
  text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px;
  background: var(--surface-sunken); margin-bottom: 20px; display: grid;
  grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px;
}
.recap dt { color: var(--ink-faint); }
.recap dd { margin: 0; font-weight: 600; }

.notice {
  text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px;
  font-size: 12.5px; color: var(--ink-soft);
}
.notice p { margin: 0 0 8px; font-weight: 700; color: var(--ink); font-size: 12px; }
.notice ul { margin: 0; padding-left: 18px; }
.notice li { margin-bottom: 6px; }

.btn {
  appearance: none; border: 2px solid var(--accent); border-radius: 10px; padding: 12px 24px;
  font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none;
  display: inline-block;
}
.btn-primary { background:#eb006a; color: #fff;border-color: #eb006a; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: #595959; color: #fff; border-color: #595959; }
.btn-ghost:hover { background: #3b3a3a; }

.toolbar { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--line); }

.alert {
  border: 1px solid var(--stamp); background: var(--stamp-soft); color: var(--stamp);
  border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-bottom: 20px;
}
.alert.info { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }

.complete-wrap { max-width: 620px; margin: 0 auto; text-align: center; }
.check {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin: 0 auto 16px; font-size: 22px;
}
.main-content {
    background: #fff;
    padding: 20px;
    /* border-radius: 34px; */
    border-radius: 15px;
    border: 1px solid #fc7924;
}

.main-content h1 {
    font-size: 22px;
    margin: 4px 0 0;
    font-weight: 700;
    text-align: center;
    border-bottom: 4px solid #eb006a;
        color: #282828;
        font-size: 1.6em;
        padding-bottom: 20px;
        font-weight: bold;
        margin-bottom: 30px;
}

.header {
        width: 100%;
        height: 65px;
        margin-right: auto;
        margin-left: auto;
        margin-bottom: 15px;
        background-color: #ffe6a4;
        border-bottom: 4px solid #fc7924;
        position: relative;
    }
.header .eyebrow {
    display: block;
    font-size: 20px;
    letter-spacing: 0.01em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
    border-bottom: none;
    width: auto;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
    position: relative;
}
a.btn.btn-secondary {
    position: absolute;
    right: 0;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    border: none;
}