/* 宛名印刷ツール（/atena/maker/）だけで読む CSS。色は css/site.css の藍（--ai）に合わせる
   姉妹サイトの宛名印刷ツールの CSS（.atena-*・.maker-*）を移し、色と字体をこのサイトのものに置き換えた */
.atena { --a-card: #fff; --a-paper: #f7f9fb; --a-warn: #b3261e; --a-ease: cubic-bezier(.2, .8, .2, 1); --a-r: 8px; }
.atena-title small { display: block; margin-top: 6px; font: 400 .95rem/1.6 var(--gothic); color: var(--muted); }
.atena-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; margin: 16px 0; padding: 0; list-style: none; font-size: .9rem; color: var(--muted); }
.atena-points li { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--a-r); background: var(--a-card); }
.atena-points b { display: block; color: var(--ai); font-size: 1rem; }
.atena-privacy { display: flex; gap: 12px; align-items: center; margin: 0 0 8px; padding: 12px 16px; background: var(--ai-soft); border-radius: var(--a-r); font-size: .9rem; }
.atena-privacy::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #3f8f5b; box-shadow: 0 0 0 4px rgba(63, 143, 91, .18); }

/* 2段組：左に入力、右にプレビュー（PC では追従） */
.atena-app { display: grid; gap: 28px; margin-top: 20px; }
.atena-side { display: grid; gap: 20px; min-width: 0; }
@media (min-width: 900px) { .atena-app { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 40px; } .atena-main { position: sticky; top: 16px; } }
.atena .maker-form h2, .atena-main h2 { margin: 0 0 16px; padding: 0; border: 0; font: 600 1.2rem/1.4 var(--mincho); color: var(--ai); }
.atena-h3 { margin: 20px 0 10px; font: 600 1rem/1.4 var(--mincho); }
.atena-h3 span { font: 400 .8rem var(--gothic); color: var(--muted); margin-left: 6px; }
.atena [hidden] { display: none !important; }

/* 入力欄 */
.maker-form { padding: clamp(16px, 3vw, 24px); background: var(--a-card); border: 1px solid var(--line); border-radius: var(--a-r); }
.maker-form label, .maker-form fieldset { display: block; margin: 0 0 18px; font-size: .9rem; font-weight: 700; }
.maker-form fieldset { border: 0; padding: 0; }
.maker-form legend { padding: 0; margin-bottom: 8px; }
.maker-form input:not([type]), .atena .maker-form input[type=number] { display: block; width: 100%; min-height: 46px; margin-top: 6px; padding: 10px 12px; font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); border: 1px solid #c8d0da; border-radius: var(--radius); background: #fff; }
.maker-form input:not([type]):focus, .atena .maker-form input[type=number]:focus { outline: none; border-color: var(--ai); box-shadow: 0 0 0 3px rgba(31, 58, 95, .15); }
.maker-form input[type=radio], .maker-form input[type=checkbox], .atena input[type=checkbox] { accent-color: var(--ai); }
.maker-radio { display: inline-flex !important; align-items: center; gap: 6px; min-height: 44px; margin: 0 18px 0 0 !important; font-weight: 400 !important; }
.maker-remember { padding-top: 16px !important; border-top: 1px solid var(--line) !important; }
.maker-hint { font-size: .82rem; font-weight: 400; color: var(--muted); margin: 0 0 8px; }
.maker-btn { min-height: 44px; padding: 8px 18px; font: inherit; font-size: .9rem; font-weight: 700; border: 1px solid var(--ai); border-radius: var(--radius); background: #fff; color: var(--ai); cursor: pointer; }
.maker-btn:hover { background: var(--ai-soft); }
.maker-warn { color: var(--a-warn); font-size: .9rem; min-height: 1em; }
.atena-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atena-btn-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 56px; padding: 10px 20px; font: inherit; font-weight: 700; font-size: 1.05rem; color: #fff; background: var(--ai); border: 0; border-radius: var(--radius); cursor: pointer; }
.atena-btn-main small { font-weight: 400; font-size: .78rem; opacity: .9; }
.atena-btn-main:hover { opacity: .92; }
.atena-btn-main:disabled { opacity: .45; cursor: not-allowed; }

/* 読み込み */
.atena-import { display: grid; gap: 10px; }
.atena-file-btn { position: relative; display: flex !important; align-items: center; gap: 12px; min-height: 64px; margin: 0 !important; padding: 10px 16px; color: #fff; background: var(--ai); border-radius: var(--a-r); cursor: pointer; }
.atena-file-btn:hover { opacity: .92; }
.atena-file-btn:focus-within { outline: 3px solid var(--ai); outline-offset: 2px; }
.atena-file-btn svg { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.atena-file-btn span { display: grid; font-size: 1rem; line-height: 1.4; }
.atena-file-btn small { font-weight: 400; font-size: .78rem; opacity: .9; }
.atena-file-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.atena-paste textarea { display: block; width: calc(100% - 28px); min-height: 200px; margin-top: 6px; padding: 12px 14px; font: 400 16px/1.7 var(--gothic); color: var(--ink); background: #fff; border: 1px solid #c8d0da; border-radius: var(--radius); resize: vertical; }
.atena-paste textarea:focus { outline: 2px solid var(--ai); outline-offset: 1px; }
.atena .atena-paste-label { display: block; margin-bottom: 0; font-size: .85rem; line-height: 1.6; }
.atena-paste-rules { margin: 10px 14px 0; padding-left: 1.2em; font-size: .8rem; line-height: 1.7; color: var(--muted); }
.atena-paste-go { margin-top: 12px !important; }
.atena-import-msg { margin: 10px 0 0; }
.atena-import-msg:empty { display: none; }
.atena .atena-mode { margin: 14px 0 0; }
.atena-mode legend { margin-bottom: 6px; font-size: .82rem; font-weight: 400; color: var(--muted); }
.atena-seg { display: inline-flex; padding: 3px; background: var(--ai-soft); border-radius: 999px; }
.atena .atena-seg label { position: relative; display: block; margin: 0; cursor: pointer; }
.atena-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.atena-seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; font-size: .85rem; color: var(--muted); border-radius: 999px; }
.atena-seg input:checked + span { color: var(--ai); background: #fff; box-shadow: 0 1px 3px rgba(31, 58, 95, .2); }
.atena-seg input:focus-visible + span { outline: 2px solid var(--ai); outline-offset: 1px; }
.atena-start { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.atena-link { padding: 0; font: inherit; font-weight: 700; color: var(--ai); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* 開け閉めする欄（貼り付け・会社あて） */
.atena-more { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--a-r); background: var(--a-card); }
.atena-import .atena-more { margin: 0; }
.atena-more:hover, .atena-more[open] { border-color: var(--ai); }
.atena-more summary { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px 14px; cursor: pointer; list-style: none; }
.atena-more summary::-webkit-details-marker { display: none; }
.atena-more-txt { display: flex; flex-direction: column; line-height: 1.4; font-size: .92rem; font-weight: 700; color: var(--ai); }
.atena-more-txt small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.atena-more-ic { position: relative; flex: none; margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--ai); }
.atena-more-ic::before, .atena-more-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: #fff; transition: transform .25s var(--a-ease); }
.atena-more-ic::after { transform: rotate(90deg); }
.atena-more[open] .atena-more-ic::after { transform: rotate(0deg); }
.atena-more[open] summary { border-bottom: 1px dashed var(--line); }
.atena-more > :not(summary) { margin-left: 14px; margin-right: 14px; }
.atena-more > :nth-child(2) { margin-top: 12px; }
.atena-more > :last-child { margin-bottom: 12px; }

/* 住所録の一覧 */
.atena-book { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.atena-book-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.atena-book-head .atena-h3 { margin: 0; }
.atena .atena-check-all { display: inline-flex; margin: 0; align-items: center; gap: 8px; min-height: 44px; font-size: .9rem; cursor: pointer; }
.atena-check-all input { width: 20px; height: 20px; margin: 0; }
.atena-empty { margin: 0; padding: 18px; font-size: .9rem; color: var(--muted); text-align: center; border: 1px dashed #c8d0da; border-radius: var(--a-r); }
.atena-list { list-style: none; margin: 0 0 8px; padding: 0; max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--a-r); background: #fff; }
.atena-list:empty { display: none; }
.atena-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 2px 4px 2px 0; border-bottom: 1px solid var(--line); }
.atena-row:last-child { border-bottom: 0; }
.atena-row:hover { background: #f7f9fb; }
.atena-row.is-current { background: var(--ai-soft); box-shadow: inset 3px 0 0 var(--ai); }
.atena-row input[type=checkbox] { width: 20px; height: 20px; margin: 12px 4px 12px 14px; cursor: pointer; }
.atena-row-main { display: grid; gap: 1px; min-height: 52px; padding: 6px 10px; text-align: left; font: inherit; background: none; border: 0; cursor: pointer; color: var(--ink); min-width: 0; }
.atena-row-main strong { font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
.atena-row-main small { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atena-row-main em { font-size: .75rem; font-style: normal; font-weight: 700; color: var(--a-warn); }
.atena-row:has(input:not(:checked)) .atena-row-main { opacity: .5; }
.atena-row-tools { display: flex; align-items: center; }
.atena-row-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; height: 44px; padding: 0 8px; font: inherit; font-size: .8rem; font-weight: 700; color: var(--muted); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.atena-row-btn svg, .atena-tool svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.atena-row-btn:hover { color: var(--ai); background: var(--ai-soft); }
.atena-row-btn.is-del:hover { color: var(--a-warn); background: #fbeaea; }
.atena-list-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.atena-tool { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; font: inherit; font-size: .85rem; font-weight: 700; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.atena-tool:hover { color: var(--ai); }
.atena-tool.is-danger:hover, .atena-tool.is-armed { color: var(--a-warn); }
.atena-tool.is-armed { padding: 0 12px; text-decoration: none; background: #fbeaea; border-radius: 999px; }
.atena-edit-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.atena-edit-btns .atena-btn-main { width: auto; min-height: 48px; }

/* プレビュー・PDF */
.atena-preview-name { text-align: center; font: 600 1rem var(--mincho); margin: 0 0 8px; }
.atena-main canvas { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 2px 4px rgba(31, 58, 95, .1), 0 20px 36px -20px rgba(31, 58, 95, .4); }
@media (min-width: 900px) { .atena-main canvas { width: auto; max-width: min(100%, 420px); max-height: calc(100vh - 440px); min-height: 300px; } }
.atena-nav { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 8px; font-size: .9rem; }
.atena-msg { min-height: 1.5em; font-size: .9rem; }
.atena-msg.is-warn { color: var(--a-warn); }
.maker-save { display: grid; gap: 10px; }
.maker-next { font-size: .9rem; }
.atena-table { overflow-x: auto; }
.atena-table table.simple th { width: auto; }

/* スマホ：プレビューが画面にないあいだ、下に「プレビューと PDF へ」の帯（app.js が is-shown を付ける） */
.maker-dock { display: none; }
@media (max-width: 899px) {
  .maker-dock { position: fixed; z-index: 55; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--ai); color: #fff; text-decoration: none; border-radius: var(--a-r); box-shadow: 0 12px 28px -10px rgba(31, 58, 95, .7); opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .25s var(--a-ease), transform .25s var(--a-ease), visibility .25s; }
  .maker-dock.is-shown { opacity: 1; visibility: visible; transform: none; }
  .maker-dock span { display: grid; flex: 1; min-width: 0; line-height: 1.4; }
  .maker-dock small { font-size: .72rem; opacity: .85; }
  .maker-dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; }
}
