/* 資料DL：共通フォーム（.dlf）と Web 閲覧ページ（.dlv） */

.dlf,
.dlv {
  --dl-teal: #00a9c4;
  --dl-teal-d: #00869c;
  --dl-teal-soft: #e3f6f9;
  --dl-sun: #ffd200;
  --dl-ink: #1d2322;
  --dl-muted: #5f6866;
  --dl-line: #dde3e3;
  --dl-bg: #f4f6f6;
  --dl-err: #c2410c;
  color: var(--dl-ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Arial, Meiryo, sans-serif;
  line-height: 1.7;
}
.dlf *,
.dlv * {
  box-sizing: border-box;
}
.dlf h2,
.dlv h1,
.dlv h2 {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  font-weight: 700;
  color: var(--dl-ink);
}
.dlf h2::before,
.dlf h2::after,
.dlv h1::before,
.dlv h1::after,
.dlv h2::before,
.dlv h2::after {
  content: none;
}
.dlf p,
.dlv p {
  margin: 0;
}
.dlv a,
.dlf a {
  text-decoration: none;
}
.dlv button,
.dlf button {
  font: inherit;
  cursor: pointer;
}

/* ---- 共通フォーム ---- */
.dlf {
  container-type: inline-size;
  background: #fff;
  border: 1px solid #e3e8e8;
  border-radius: 12px;
  padding: 22px 22px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
.dlf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.dlf-title {
  font-size: 17px;
}
.dlf-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--dl-teal-d);
  background: var(--dl-teal-soft);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.dlf-lead {
  font-size: 12px;
  color: var(--dl-muted);
  margin: 6px 0 14px !important;
  line-height: 1.6;
}
.dlf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.dlf-f {
  display: block;
  margin: 0;
}
.dlf-l {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}
.dlf-l i,
.dlf-check i {
  color: var(--dl-err);
  font-style: normal;
  margin-left: 2px;
}
.dlf input[type="text"],
.dlf input[type="email"],
.dlf input[type="tel"] {
  width: 100%;
  height: 40px;
  border: 1px solid #cfd6d6;
  border-radius: 6px;
  background: var(--dl-bg);
  padding: 0 10px;
  font-size: 15px;
  color: var(--dl-ink);
  transition: border-color 0.15s, background 0.15s;
}
.dlf input::placeholder {
  color: #a3abaa;
  font-size: 13px;
}
.dlf input:focus {
  outline: none;
  border-color: var(--dl-teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 169, 196, 0.15);
}
.dlf .is-err input {
  border-color: var(--dl-err);
  background: #fff7f3;
}
.dlf-msg {
  display: none;
  font-size: 11px;
  color: var(--dl-err);
  margin-top: 3px;
}
.dlf .is-err .dlf-msg {
  display: block;
}
.dlf-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.dlf-consent {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf0f0;
  display: grid;
  gap: 7px;
}
.dlf-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.55;
  cursor: pointer;
}
.dlf-check input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--dl-teal);
}
/* テーマ共通のチェックボックス装飾（本体を隠して span::before に四角を描く）を打ち消し、標準のチェックボックスを出す */
.dlf .dlf-check input[type="checkbox"] {
  display: inline-block !important;
  -webkit-appearance: checkbox !important;
  appearance: auto !important;
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.dlf .dlf-check span {
  padding-left: 0 !important;
}
.dlf .dlf-check span::before,
.dlf .dlf-check span::after {
  content: none !important;
  display: none !important;
}
.dlf-check.is-err span {
  color: var(--dl-err);
}
.dlf-note {
  font-size: 11px;
  color: var(--dl-muted);
  line-height: 1.6;
}
.dlf-note a,
.dlf-check a {
  color: var(--dl-teal-d);
  text-decoration: underline;
}
.dlf-note summary {
  cursor: pointer;
  color: var(--dl-teal-d);
  display: inline;
}
.dlf-note details p {
  margin: 6px 0 0;
}
.dlf-error {
  margin-top: 12px !important;
  font-size: 13px;
  color: var(--dl-err);
  background: #fff7f3;
  border-radius: 6px;
  padding: 8px 10px;
}
.dlf-submit {
  display: block;
  width: 100%;
  margin-top: 14px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--dl-teal);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  transition: opacity 0.2s;
}
.dlf-submit:hover {
  opacity: 0.85;
}
.dlf-submit[disabled] {
  opacity: 0.6;
  cursor: wait;
}
.dlf-recaptcha {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--dl-muted);
  text-align: center;
}
.dlf-recaptcha a {
  color: inherit;
  text-decoration: underline;
}
/* 表記を出しているので、画面右下の reCAPTCHA バッジは隠す */
.grecaptcha-badge {
  visibility: hidden;
}
.dlf-done {
  text-align: center;
  padding: 24px 0;
  font-size: 16px;
}
@container (max-width: 420px) {
  .dlf-row {
    grid-template-columns: 1fr;
  }
  .dlf-row--name {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- 閲覧ページ ---- */
.dlv {
  max-width: 1000px;
  margin: 24px auto 80px;
}
.dlv-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.dlv-thanks {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dl-teal-d);
  background: #fff;
  border: 1px solid var(--dl-teal);
  border-radius: 999px;
  padding: 4px 14px;
}
.dlv-title {
  font-size: 22px;
  line-height: 1.5;
  margin-top: 12px !important;
}
.dlv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--dl-muted);
  margin-top: 8px !important;
}
.dlv-meta span::before {
  content: "■";
  color: var(--dl-teal);
  margin-right: 4px;
  font-size: 10px;
  vertical-align: 1px;
}
.dlv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  padding: 12px 24px;
  line-height: 1.3;
  transition: opacity 0.2s;
  border: 0;
}
.dlv-btn:hover {
  opacity: 0.8;
}
.dlv-btn--primary {
  background: var(--dl-sun);
  color: var(--dl-ink) !important;
}
.dlv-btn--ghost {
  background: #fff;
  color: var(--dl-teal-d) !important;
  border: 2px solid var(--dl-teal);
}
.dlv-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.dlv-viewer {
  margin-top: 24px;
  background: #2b3132;
  border-radius: 12px;
  padding: 20px 20px 16px;
  color: #fff;
}
.dlv-stage {
  position: relative;
  aspect-ratio: var(--dlv-ratio, 1.414);
  width: min(100%, calc((100vh - 250px) * var(--dlv-ratio, 1.414)));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.dlv-canvas {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s;
}
.dlv-canvas.is-loading {
  opacity: 0.35;
}
.dlv-loading[hidden] {
  display: none;
}
.dlv-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dl-muted);
  font-size: 14px;
}
.dlv-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  background: none;
  border: 0;
  padding: 0;
}
.dlv-zone--prev {
  left: 0;
  width: 30%;
  cursor: w-resize;
}
.dlv-zone--next {
  right: 0;
  width: 70%;
  cursor: e-resize;
}
.dlv-stage.is-end .dlv-zone {
  display: none;
}
.dlv-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border-radius: 50%;
  border: 0;
  background: rgba(29, 35, 34, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.dlv-arrow:hover {
  background: var(--dl-teal);
}
.dlv-arrow svg {
  width: 22px;
  height: 22px;
}
.dlv-arrow--prev {
  left: 12px;
}
.dlv-arrow--next {
  right: 12px;
}
.dlv-arrow[disabled] {
  opacity: 0;
  pointer-events: none;
}
.dlv-hint {
  position: absolute;
  right: 76px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(29, 35, 34, 0.8);
  color: #fff;
  font-size: 12px;
  border-radius: 999px;
  padding: 5px 12px;
  pointer-events: none;
  transition: opacity 0.4s;
}
.dlv-hint.is-off {
  opacity: 0;
}
.dlv-end {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--dl-teal);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 8%;
}
.dlv-end[hidden] {
  display: none;
}
.dlv-end h2 {
  color: #fff !important;
  font-size: 24px;
}
.dlv-end p {
  font-size: 14px;
  margin-top: 8px !important;
  opacity: 0.95;
}
.dlv-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.dlv-end .dlv-btn--ghost {
  border-color: #fff;
}
.dlv-restart {
  margin-top: 16px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
}
.dlv-ctrl {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.dlv-count {
  font-size: 13px;
  white-space: nowrap;
  min-width: 58px;
  font-family: Arial, sans-serif;
}
.dlv-count b {
  font-size: 20px;
}
.dlv-pagetitle {
  font-size: 13px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
}
.dlv-progress {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
.dlv-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--dl-sun);
  transition: width 0.35s;
}
.dlv-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: none;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.dlv-icon:hover {
  background: rgba(255, 255, 255, 0.12);
}
.dlv-icon svg {
  width: 18px;
  height: 18px;
}
.dlv-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.dlv-thumbs::-webkit-scrollbar {
  display: none;
}
.dlv-thumb {
  flex: 0 0 96px;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 0;
  background: #fff;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
  position: relative;
  aspect-ratio: var(--dlv-ratio, 1.414);
}
.dlv-thumb canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 2px;
}
.dlv-thumb span {
  position: absolute;
  left: 3px;
  bottom: 3px;
  font-size: 10px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 2px;
  padding: 2px 4px;
}
.dlv-thumb:hover {
  opacity: 0.85;
}
.dlv-thumb.is-on {
  opacity: 1;
  border-color: var(--dl-sun);
}
.dlv-thumb--end {
  background: var(--dl-teal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dlv-viewer:fullscreen {
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 4vw;
}
.dlv-viewer:fullscreen .dlv-stage {
  width: min(100%, calc((100vh - 170px) * var(--dlv-ratio, 1.414)));
}
.dlv-sub {
  font-size: 12px;
  color: var(--dl-muted);
  margin-top: 10px !important;
}
.dlv-more {
  text-align: center;
  margin-top: 28px !important;
  font-size: 14px;
}
.dlv-more a {
  color: var(--dl-teal-d);
  font-weight: 700;
  border-bottom: 1px solid currentColor;
}
.dlv-dock {
  display: none;
}

/* 期限切れ・無効 */
.dlv-expired {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 32px;
  align-items: start;
}
.dlv-expired-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #8a5a00;
  background: #fff3cc;
  border-radius: 6px;
  padding: 3px 10px;
}
.dlv-expired-text > p {
  font-size: 14px;
  margin-top: 14px !important;
}
.dlv-expired-text a {
  color: var(--dl-teal-d);
  text-decoration: underline;
}

@media (max-width: 767px) {
  .dlv {
    margin-bottom: 96px;
  }
  .dlv-title {
    font-size: 18px;
  }
  .dlv-hero > .dlv-btn {
    display: none;
  }
  .dlv-viewer {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    padding: 12px;
  }
  .dlv-stage {
    width: 100%;
  }
  .dlv-arrow {
    width: 38px;
    height: 38px;
    margin-top: -19px;
  }
  .dlv-arrow svg {
    width: 18px;
    height: 18px;
  }
  .dlv-arrow--prev {
    left: 6px;
  }
  .dlv-arrow--next {
    right: 6px;
  }
  .dlv-hint,
  .dlv-pagetitle {
    display: none;
  }
  .dlv-thumb {
    flex-basis: 72px;
  }
  .dlv-end h2 {
    font-size: 16px;
  }
  .dlv-end p {
    display: none;
  }
  .dlv-end-actions {
    margin-top: 10px;
    gap: 6px;
  }
  .dlv-end .dlv-btn {
    padding: 8px 14px;
    font-size: 12px;
  }
  .dlv-restart {
    margin-top: 6px;
    font-size: 11px;
  }
  .dlv-dock {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: #fff;
    border-top: 1px solid var(--dl-line);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
  }
  .dlv-dock .dlv-btn {
    flex: 1;
    padding: 11px 8px;
    font-size: 14px;
  }
  .dlv-expired {
    grid-template-columns: 1fr;
  }
}

/* ---- 資料ごとのフォーム送信後：閲覧ページの準備中表示 ---- */
.dlv-preparing{margin:16px 0 0;padding:14px 16px;border-radius:8px;background:#eef8fa;color:#1d2322;font-size:14px;line-height:1.7;font-weight:600}
.dlv-handoff{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(255,255,255,.94)}
.dlv-handoff .dlv-preparing{max-width:420px;margin:0;text-align:center}
.dlv-expired-form{min-width:0}
