@charset 'UTF-8';

/**
 * ナゾトキ共通スタイル（ホームズ風・探偵事務所の事件簿）
 * - 共通CSS（/common/css/style.css）は変更せず、ナゾトキ用の装飾だけをここに記述する
 * - クラス名はすべて riddle- で始める（共通CSSの kn- と区別するため）
 * - 読み込み順：style.css のあとに読み込む
 */

/* ===== 調査報告書（解答欄） ===== */
.riddle-report {
  --riddle-paper: #f5edd8;
  --riddle-ink: #26304a;
  --riddle-brown: #7a6540;
  --riddle-red: #a32a2a;

  position: relative;
  margin: 2.4em 0 0;
  padding: 36px 28px 28px;
  color: var(--riddle-ink);
  border: 1px solid #cdbb8b;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 70%),
    repeating-linear-gradient(0deg, rgba(122,101,64,.06) 0, rgba(122,101,64,.06) 1px, transparent 1px, transparent 30px),
    var(--riddle-paper);
  box-shadow:
    0 6px 14px rgba(70,50,10,.18),
    4px 4px 0 -1px #eadfbf,
    8px 8px 0 -2px #ddd0a8;

  font-family: '游明朝','Yu Mincho','Hiragino Mincho ProN','Hiragino Mincho Pro','Noto Serif JP','MS PMincho',serif;
  line-height: 1.7;
}

/* 紙の内側の罫線 */
.riddle-report:before {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  left: 8px;
  content: '';
  pointer-events: none;
  border: 1px solid rgba(122,101,64,.35);
}

/* 上部のクリップ */
.riddle-report:after {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 86px;
  height: 26px;
  margin-left: -43px;
  content: '';
  pointer-events: none;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg,#6b6f78 0%,#3f434b 55%,#2c2f35 100%);
  box-shadow: 0 2px 3px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.35);
}

/* --- 見出し部分 --- */
.riddle-report__head {
  margin-bottom: 6px;
}

.riddle-report__en {
  font-size: 11px;
  letter-spacing: .35em;
  text-indent: .35em;
  text-align: center;
  color: var(--riddle-brown);
}

.riddle-report__title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  margin: 2px 0 0;
  padding-bottom: 10px;
  letter-spacing: .4em;
  text-indent: .4em;
  text-align: center;
  border-bottom: 3px double var(--riddle-brown);
}

.riddle-report__meta {
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0 0;
  color: var(--riddle-brown);

  gap: 2px 28px;
}

/* --- 記入欄 --- */
.riddle-report__list {
  margin: 0;
}

.riddle-report__row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dotted rgba(122,101,64,.7);

  gap: 12px;
}

.riddle-report__row>dt {
  font-size: 15px;
  font-weight: 700;
  flex: 0 0 15.5em;
}

.riddle-report__row>dd {
  flex: 1 1 auto;
  margin: 0;
}

/* プルダウン：下線だけの記入欄にする */
.riddle-report__select {
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  min-width: 12em;
  padding: 7px 34px 7px 8px;
  cursor: pointer;
  color: var(--riddle-ink);
  border: 0;
  border-bottom: 2px solid var(--riddle-brown);
  border-radius: 0;
  background: transparent url('data:image/svg+xml;charset=utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2714%27 height=%278%27 viewBox=%270 0 14 8%27%3E%3Cpath d=%27M1 1l6 6 6-6%27 fill=%27none%27 stroke=%27%237a6540%27 stroke-width=%272%27/%3E%3C/svg%3E') no-repeat right 8px center;

  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}

/* 未選択のときは、薄い文字（手書きの空欄のような見た目） */
.riddle-report__select:required:invalid {
  font-weight: 400;
  color: #9a8a68;
}

.riddle-report__select option {
  color: var(--riddle-ink);
}

.riddle-report__select:hover {
  background-color: rgba(255,255,255,.35);
}

.riddle-report__select:focus {
  outline: 2px solid var(--riddle-brown);
  outline-offset: 2px;
  background-color: rgba(255,255,255,.5);
}

/* --- 提出ボタン --- */
.riddle-report .kn-grid {
  margin-bottom: 0;
}

.riddle-report .kn-btn.-purple {
  font-family: inherit;
  letter-spacing: .15em;
  color: #f5edd8;
  border: 1px solid #1a2238;
  border-radius: 3px;
  background-color: var(--riddle-ink);
  box-shadow: 0 2px 0 #121828;
}

.riddle-report .kn-btn.-purple:hover {
  text-decoration: none;
  background-color: #38456a;
}

/* --- 「解決」スタンプ（正解したときに押される） --- */
.riddle-report__stamp {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.2;
  position: absolute;
  z-index: 1;
  top: 128px;
  right: 28px;
  padding: 4px 16px;
  transition: opacity .25s ease-out, transform .25s ease-out;
  -webkit-transform: rotate(-14deg) scale(1.7);
          transform: rotate(-14deg) scale(1.7);
  letter-spacing: .2em;
  text-indent: .2em;
  pointer-events: none;
  opacity: 0;
  color: var(--riddle-red);
  border: 4px double var(--riddle-red);
  border-radius: 6px;
  mix-blend-mode: multiply;
}

.riddle-report.is-solved .riddle-report__stamp {
  -webkit-transform: rotate(-14deg) scale(1);
          transform: rotate(-14deg) scale(1);
  opacity: .85;
}

@media (prefers-reduced-motion:reduce) {
  .riddle-report__stamp {
    transition: none;
  }
}

/* 調査報告書：コーヒーのしみ（飾り） */
.riddle-report__head {
  position: relative;
}

.riddle-report__head:after {
  position: absolute;
  top: -10px;
  left: -4px;
  width: 54px;
  height: 54px;
  content: '';
  pointer-events: none;
  border: 5px solid rgba(122,85,40,.13);
  border-right-color: rgba(122,85,40,.05);
  border-radius: 50%;
}

/* --- チェックボックス（うそをついている人）：チェックすると赤い印が押される --- */
.riddle-report__row>dt small {
  font-size: 12px;
  font-weight: 400;
  display: block;
  color: var(--riddle-brown);
}

.riddle-report__checks {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;
}

.riddle-report__check {
  position: relative;
  display: block;
  cursor: pointer;
}

.riddle-report__check input {
  position: absolute;
  opacity: 0;
}

.riddle-report__check span {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  display: block;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding-top: 11px;
  transition: color .15s, background-color .15s, border-color .15s;
  text-align: center;
  color: var(--riddle-brown);
  border: 2px solid var(--riddle-brown);
  border-radius: 4px;
  background: rgba(255,255,255,.4);
}

.riddle-report__check:hover span {
  background: rgba(255,255,255,.75);
}

.riddle-report__check input:checked+span {
  color: var(--riddle-red);
  border: 4px double var(--riddle-red);
  border-radius: 50%;
  background: rgba(163,42,42,.08);
  padding-top: 9px;
}

.riddle-report__check input:focus-visible+span {
  outline: 2px solid var(--riddle-ink);
  outline-offset: 2px;
}

/* ===== 見出し（h2）の画像：縦長の画像は、幅ではなく高さをそろえる ===== */
.kn-ttl.-decoration>img.riddle-ico-tall:first-child {
  width: auto;
  height: 50px;
  margin-right: 12px;
  margin-bottom: -4px;
}

/* ===== 飾りのイラスト ===== */
.riddle-steps {
  margin: 28px 0 0;
  text-align: center;
  opacity: .4;
}

.riddle-steps img {
  width: 240px;
  height: auto;
}

.riddle-report__deco img {
  position: absolute;
  bottom: 24px;
  height: auto;
  pointer-events: none;
}

.riddle-report__ink {
  left: 48px;
  width: 54px;
  opacity: .9;
}

.riddle-report__quill {
  right: 56px;
  bottom: 18px;
  width: 36px;
  -webkit-transform: rotate(18deg);
          transform: rotate(18deg);
}

/* 問題文のBOX（kn-box）の右側に置く飾り */
.riddle-story__img {
  float: right;
  height: auto;
  margin: 0 0 8px 16px;
}

.riddle-story__img.-chair,.riddle-story__img.-pipe {
  width: 72px;
}

.riddle-story__img.-holmes {
  width: 96px;
  margin-top: 0;
}

/* 樹形図（SVG） */
.riddle-tree {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto;
}

.riddle-clear:after {
  display: block;
  clear: both;
  content: '';
}

/* --- スマホ幅 --- */
@media screen and (max-width:767px) {
  .riddle-report {
    padding: 34px 16px 22px;
  }

  .riddle-report__title {
    font-size: 22px;
  }

  .riddle-report__meta {
    font-size: 12px;
    gap: 0 16px;
  }

  .riddle-report__row {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;

    gap: 4px;
  }

  .riddle-report__row>dt {
    flex-basis: auto;
  }

  .riddle-report__select {
    min-width: 9.5em;
  }

  .riddle-report__stamp {
    font-size: 24px;
    top: auto;
    right: 14px;
    bottom: 160px;
    padding: 2px 10px;
    border-width: 3px;
  }

  .riddle-report__check span {
    width: 40px;
    height: 40px;
    padding-top: 9px;
  }

  .riddle-report__check input:checked+span {
    padding-top: 7px;
  }

  .riddle-report__checks {
    gap: 6px;
  }

  .riddle-steps img {
    width: 180px;
  }

  .riddle-report__deco {
    display: none;
  }

  .riddle-story__img.-chair,.riddle-story__img.-pipe {
    width: 44px;
    margin-left: 10px;
  }

  .riddle-story__img.-holmes {
    width: 64px;
    margin-left: 10px;
  }

  .kn-ttl.-decoration>img.riddle-ico-tall:first-child {
    height: 35px;
    margin-right: 8px;
    margin-bottom: -2px;
  }
}
