/* ポテの おりがみ (scripts/asobi/origami_build.py が作るページ) */
.ori-page { max-width: 980px; }
.ori-head { margin: 8px 0 18px; }
.ori-head h1 { margin: 4px 0 8px; font-size: clamp(28px, 5vw, 40px); }
.ori-lead { margin: 0 0 12px; color: var(--soft); }
.ori-how { margin: 0 0 14px; padding-left: 1.4em; color: var(--ink); line-height: 1.8; }
.ori-how b { color: #c56a25; }
.ori-head .sheet-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.ori-head .btn-sub { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--card); box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); font-weight: 700; text-decoration: none; }

.ori-sheet { padding: 14px; }
.ori-print + .ori-print { margin-top: 14px; }
.ori-print { display: block; width: 100%; height: auto; font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif; }

.ori-guide { margin-top: 28px; scroll-margin-top: 12px; }
.ori-guide h2 { margin: 0 0 6px; font-size: 24px; }
.ori-guide h2 small { margin-left: 6px; color: var(--soft); font-size: 14px; font-weight: 700; }
.ori-guide-note { margin: 0 0 12px; color: var(--soft); font-size: 14px; }
.ori-stage { position: relative; overflow: hidden; border-radius: 24px; background: linear-gradient(#fffaf2, #f6ead8); aspect-ratio: 4 / 3; max-height: 70vh; width: 100%;
  box-shadow: inset 0 0 0 2px var(--line); touch-action: none; }
.ori-stage canvas { display: block; width: 100%; height: 100%; }
.ori-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--soft); }
.ori-caption { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 10px; align-items: center; padding: 8px 12px;
  border-radius: 16px; background: rgb(255 255 255 / 88%); color: #5c4633; font-size: 17px; font-weight: 700; line-height: 1.45; pointer-events: none; }
.ori-cap-num { flex: none; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 999px;
  background: #5c4633; color: #fff; font-size: 16px; }
.ori-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 12px 0 4px; }
.ori-controls button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line); font: inherit; font-weight: 800; cursor: pointer; }
.ori-controls button.is-main { background: #e8833a; color: #fff; box-shadow: none; min-width: 120px; }
.ori-controls button:disabled { opacity: .4; cursor: default; }
.ori-slow { display: inline-flex; gap: 6px; align-items: center; min-height: 48px; padding: 0 8px; font-weight: 700; }
.ori-slow input { width: 20px; height: 20px; }
.ori-tip-now { min-height: 1.6em; margin: 6px auto 16px; max-width: 42em; color: var(--soft); text-align: center; }

.ori-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ori-step { padding: 10px 12px 12px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.ori-step.is-active { box-shadow: inset 0 0 0 3px #e8833a; }
.ori-step-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.ori-step-btn svg { display: block; width: 100%; height: 150px; }
.ori-num { position: absolute; left: 0; top: 0; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px;
  background: #5c4633; color: #fff; font-weight: 800; font-size: 15px; }
.ori-say { margin: 6px 0 4px; font-weight: 800; font-size: 16px; line-height: 1.5; }
.ori-tip { margin: 0; color: var(--soft); font-size: 13.5px; line-height: 1.7; }
.is-final .ori-num { background: #e8833a; }

@media (max-width: 600px) {
  .ori-stage { aspect-ratio: 1 / 1; border-radius: 18px; }
  .ori-caption { font-size: 15px; }
  .ori-steps { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ori-step-btn svg { height: 110px; }
  .ori-say { font-size: 14px; }
  .ori-tip { font-size: 12.5px; }
}

/* 刷るときは A4 そのままの大きさ・余白 0。紙の左・右・上の辺が、そのまま正方形の辺になる (切るのは 1 本だけ)。
   まとめて印刷では迷路などと混ざるので、名前つきのページ (ori) にして、この紙だけ余白を 0 にする */
@page ori { size: A4 portrait; margin: 0; }
@media print {
  .ori-sheet { page: ori; padding: 0; margin: 0; }
  .ori-print { width: 210mm; height: 297mm; }
  .ori-sheet { line-height: 0; }
  .ori-print { height: 296.5mm; }   /* ちょうど 297mm だと、端数で白い 1 ページがはさまることがある */
  .ori-print + .ori-print { break-before: page; margin-top: 0; }   /* A4 まるごとの作品は 2 まいめが おりかたの カード */
}
