/* 画像一括工房 — 作業台の意匠
   台: #EEF0ED / マット緑: #2E6E4E / 朱: #C9401F / 墨: #1D2521 / 鋼: #79837C */
:root {
  --dai: #eef0ed;
  --mat: #2e6e4e;
  --mat-line: rgba(255, 255, 255, .14);
  --mat-deep: #245840;
  --shu: #c9401f;
  --shu-dark: #a83317;
  --sumi: #1d2521;
  --hagane: #79837c;
  --shiro: #fbfcfa;
  --waku: #d4d9d3;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--dai);
  color: var(--sumi);
  font-family: "Yu Gothic UI", "Hiragino Sans", "Meiryo", sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── 看板 ── */
.kanban {
  border-bottom: 1px solid var(--waku);
  background: var(--shiro);
}
.kanban-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.6rem 1.5rem 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: .12em;
}
.logo-sub {
  color: var(--hagane);
  font-size: .92rem;
}
.privacy-fuda {
  background: var(--sumi);
  color: #e9ece9;
  text-align: center;
  font-size: .82rem;
  padding: .35rem 1rem;
  letter-spacing: .05em;
}

/* ── 作業台 ── */
.workbench {
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
  flex: 1;
}
@media (max-width: 820px) {
  .workbench { grid-template-columns: 1fr; }
}

/* カッティングマット（署名的要素） */
.mat {
  position: relative;
  min-height: 420px;
  border-radius: 8px;
  background:
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px),
    linear-gradient(160deg, var(--mat) 0%, var(--mat-deep) 100%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .25);
  cursor: pointer;
  padding: 1.25rem;
  transition: outline-color .15s;
  outline: 3px dashed transparent;
  outline-offset: -12px;
}
.mat.dragover { outline-color: #fbfcfa; }
.mat:focus-visible { outline: 3px solid var(--shu); outline-offset: 2px; }

/* トンボ（四隅の裁ちマーク） */
.mat-corner {
  position: absolute;
  width: 22px; height: 22px;
  border-color: rgba(255, 255, 255, .55);
  border-style: solid;
  border-width: 0;
}
.mat-corner.tl { top: 14px; left: 14px; border-top-width: 2px; border-left-width: 2px; }
.mat-corner.tr { top: 14px; right: 14px; border-top-width: 2px; border-right-width: 2px; }
.mat-corner.bl { bottom: 14px; left: 14px; border-bottom-width: 2px; border-left-width: 2px; }
.mat-corner.br { bottom: 14px; right: 14px; border-bottom-width: 2px; border-right-width: 2px; }

.mat-message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  color: #f2f5f1;
  text-align: center;
  pointer-events: none;
  padding: 1rem;
}
.mat-main {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.5rem;
  letter-spacing: .1em;
}
.mat-sub { font-size: .9rem; opacity: .85; }
.mat-limit {
  margin-top: .8rem;
  font-size: .8rem;
  background: rgba(0, 0, 0, .28);
  padding: .15rem .8rem;
  border-radius: 99px;
}

/* 投入済みファイルの札 */
.file-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-content: flex-start;
}
.file-card {
  background: var(--shiro);
  border-radius: 6px;
  padding: .45rem;
  width: 108px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  font-size: .72rem;
  line-height: 1.35;
}
.file-card img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #dde1dc;
}
.file-card .fname {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .3rem;
}
.file-card .fsize { color: var(--hagane); }

/* ── 道具トレー ── */
.tray {
  background: var(--shiro);
  border: 1px solid var(--waku);
  border-radius: 8px;
  padding: 1.25rem;
  position: sticky;
  top: 1rem;
}
.tray-title {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.05rem;
  letter-spacing: .2em;
  border-bottom: 1px solid var(--waku);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}
.tool { margin-bottom: 1.1rem; }
.tool label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.tool-value {
  display: inline-block;
  min-width: 2.2em;
  text-align: right;
  color: var(--shu);
  font-weight: 700;
}
.tool input[type="number"], .tool select {
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid var(--waku);
  border-radius: 6px;
  font: inherit;
  font-size: .9rem;
  background: #fff;
  color: var(--sumi);
}
.tool input[type="range"] { width: 100%; accent-color: var(--shu); }
.tool input:focus-visible, .tool select:focus-visible {
  outline: 2px solid var(--shu);
  outline-offset: 1px;
}
.tool-note { font-size: .76rem; color: var(--hagane); margin-top: .25rem; }

/* 選択中の合計 */
.selection-info {
  font-size: .85rem;
  color: var(--hagane);
  background: #f0f2ef;
  border: 1px solid var(--waku);
  border-radius: 6px;
  padding: .45rem .7rem;
  margin-bottom: .8rem;
  text-align: center;
}
.selection-info.has-files {
  color: var(--sumi);
  font-weight: 600;
}

/* 朱肉ボタン */
.hanko-btn {
  width: 100%;
  background: var(--shu);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .85rem 1rem;
  font: inherit;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .15s;
}
.hanko-btn:hover:not(:disabled) { background: var(--shu-dark); }
.hanko-btn:disabled { background: var(--waku); color: var(--hagane); cursor: not-allowed; }
.hanko-btn:focus-visible { outline: 2px solid var(--sumi); outline-offset: 2px; }

.status { font-size: .85rem; margin-top: .7rem; min-height: 1.4em; }
.status.error { color: var(--shu-dark); font-weight: 600; }

/* ── 処理結果 ── */
.result {
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
.result-title {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.15rem;
  letter-spacing: .15em;
  margin-bottom: .6rem;
}
.result-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--shiro);
  border: 1px solid var(--waku);
  border-radius: 8px;
  overflow: hidden;
  font-size: .88rem;
}
.result-table th, .result-table td {
  text-align: left;
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--waku);
}
.result-table th { background: #e6eae5; font-size: .8rem; letter-spacing: .05em; }
.result-table td.num, .result-table th.num { text-align: right; }
.saved { color: var(--mat); font-weight: 700; }
.grew { color: var(--hagane); }
.result-table tfoot td { font-weight: 700; border-bottom: none; background: #f3f5f2; }

/* ── 紹介（LP） ── */
.lp {
  background: var(--shiro);
  border-top: 1px solid var(--waku);
}
.lp-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 3.5rem;
}
.lp-catch {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.7rem;
  letter-spacing: .06em;
  line-height: 1.5;
}
.lp-lead { margin-top: .8rem; color: #3a423d; }
.lp-block { margin-top: 2.4rem; }
.lp-block h3 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.2rem;
  letter-spacing: .05em;
  margin-bottom: .6rem;
  padding-left: .7rem;
  border-left: 4px solid var(--mat);
}
.lp-steps { padding-left: 1.4em; }
.lp-steps li { margin: .4rem 0; }
.lp-features { list-style: none; }
.lp-features li {
  margin: .55rem 0;
  padding-left: 1.2em;
  position: relative;
}
.lp-features li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 9px; height: 9px;
  background: var(--mat);
  border-radius: 2px;
}
.lp-faq dt { font-weight: 700; margin-top: .9rem; }
.lp-faq dt::before { content: "Q. "; color: var(--mat); }
.lp-faq dd { margin-left: 1.4em; color: #3a423d; }
.lp-closing { margin-top: 3rem; text-align: center; }
.lp-closing-catch {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.25rem;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}
.lp-cta {
  display: inline-block;
  width: auto;
  padding: .85rem 2.2rem;
  text-decoration: none;
  text-align: center;
}

/* ── 足元 ── */
.ashimoto {
  border-top: 1px solid var(--waku);
  text-align: center;
  font-size: .78rem;
  color: var(--hagane);
  padding: 1rem;
  background: var(--shiro);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
