/* ==========================================================================
   v12「折り目の案内所」— 世界観のレイヤー
   Anime Bible v3.0 §03 の画面の法則をUIの言語にする：
     前へ進むと黄色が伸びる（しおり＝読み進めた量）／振り返ると青い小さなタブ（帰り道）／
     見出し＝回廊、注記＝細い縁、出典＝ページの外への扉、白い余白＝まだ決めていないこと。
   ブランドの規定（brand/DESIGN_TOKENS.md）は変えない：色・書体・角丸8px以下・影なし。
   奥行きは影ではなく「折り目」（二色の細線と紙の面の明暗）で出す。
   キャラクターの色は、キャラクターが出る場所（掛け合い・案内所の帯）でだけ使う。
   重い記事（オリュカ show:false）は body.is-quiet：飾りと動きを出さない。
   ========================================================================== */

:root {
  --paper:        #FBFAF7;                 /* 紙の面（白よりわずかに温かい） */
  --crease-dark:  rgba(7, 59, 83, 0.10);   /* 折り目の谷 */
  --crease-light: rgba(255, 255, 255, 0.95);/* 折り目の山 */
  --dogear:       16px;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.03  0 0 0 0 0.23  0 0 0 0 0.33  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");

  /* キャラクターの色（Anime Bible v3.0 §04。キャラクターが出る場所だけで使う） */
  --c-taburi:    #9DB3A7;  --c-taburi-2:   #E9E7DA;
  --c-yorikune:  #E9A36A;  --c-yorikune-2: #C27D8C;
  --c-suune:     #C9C2E5;  --c-suune-2:    #F6F4F1;  --c-suune-glow: #F4D38A;
  --c-shimero:   #444C60;  --c-shimero-2:  #BB9066;
  --c-oriuka:    var(--blue);
  --ease-fold: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 紙の地（淡色面にだけ、ごく薄い粒子） ---------- */
.section--fog,
.lead__main .card--lead .card__media,
.fold-band {
  background-image: var(--grain);
}

/* ---------- 折り目の罫（区切り線を「谷と山」の二本に） ---------- */
.section-head,
.article__dateline,
.dateline {
  border-bottom-color: transparent !important;
  background-image:
    linear-gradient(var(--crease-dark), var(--crease-dark)),
    linear-gradient(var(--crease-light), var(--crease-light));
  background-size: 100% 1px, 100% 1px;
  background-position: 0 calc(100% - 1px), 0 100%;
  background-repeat: no-repeat;
}

/* ---------- 記事カード：角が折れる（ドッグイヤー） ---------- */
.card,
.next-read__link,
.oriuka-card {
  position: relative;
}
.card__media,
.next-read__media {
  position: relative;
  overflow: hidden;
}
.card__media::after,
.next-read__media::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  background: linear-gradient(225deg, var(--white) 0 50%, var(--fog-deep) 50% 100%);
  transition: width .28s var(--ease-fold), height .28s var(--ease-fold);
  pointer-events: none;
}
.card:hover .card__media::after,
.card:focus-within .card__media::after,
.next-read__link:hover .next-read__media::after,
.next-read__link:focus-visible .next-read__media::after {
  width: 28px;
  height: 28px;
}

/* ---------- 読み進めのしおり（黄色が伸びる） ---------- */
.fold-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}
.fold-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--yellow);
  box-shadow: none;
}
.fold-progress__bar::after {                /* しおりの先端：斜めに切った紙 */
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  height: 0;
}
body.admin-bar .fold-progress { top: 32px; }
@media (max-width: 782px) { body.admin-bar .fold-progress { top: 46px; } }

/* ---------- 帰り道のタブ（青） ---------- */
.fold-back {
  position: fixed;
  left: 0;
  bottom: 88px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px 8px 10px;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--blue);
  color: var(--white);
  font: 500 14px/1.3 var(--font-ja);
  cursor: pointer;
  transform: translateX(-110%);
  transition: transform .32s var(--ease-fold);
}
.fold-back::before {                         /* タブの切り欠き */
  content: "";
  position: absolute;
  right: -8px;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(135deg, var(--blue) 0 50%, transparent 50%) top / 8px 50% no-repeat,
              linear-gradient(45deg, var(--blue) 0 50%, transparent 50%) bottom / 8px 50% no-repeat;
}
.fold-back svg { width: 18px; height: 18px; flex: 0 0 18px; }
.fold-back.is-shown { transform: translateX(0); }
.fold-back:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
:lang(en) .fold-back, :lang(uk) .fold-back { font-family: var(--font-latin); }

/* ---------- 見出しの回廊：本文の h2 に折り目の番号 ---------- */
.single .prose { counter-reset: ukr-sec; }
.single .prose > h2[id^="sec-"] {
  counter-increment: ukr-sec;
  position: relative;
  padding-top: 18px;
}
.single .prose > h2[id^="sec-"]::before {
  content: counter(ukr-sec, decimal-leading-zero);
  display: block;
  width: max-content;
  margin-bottom: 6px;
  padding: 2px 10px 2px 8px;
  font: 700 13px/1.4 var(--font-latin);
  letter-spacing: .08em;
  color: var(--navy);
  background:
    linear-gradient(135deg, transparent 0 7px, var(--fog-deep) 7px) ;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
}
.single .prose > h2[id^="sec-"]::after {    /* 回廊の折り目：見出しの上に山と谷の二本線 */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background:
    linear-gradient(var(--crease-dark), var(--crease-dark)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--crease-light), var(--crease-light)) 0 1px / 100% 1px no-repeat;
}
.single .prose > h2.is-current[id^="sec-"]::before {
  background: var(--yellow);
}

/* ---------- 目次：回廊の見取り図 ---------- */
.toc-auto__fold {
  background: var(--paper);
  background-image: var(--grain);
}
.toc-auto__list a {
  position: relative;
  transition: color .2s;
}
.toc-auto__list a.is-current {
  color: var(--navy);
  font-weight: 700;
}
.toc-auto__list a.is-current::before {
  content: "";
  position: absolute;
  left: -14px;
  top: .25em;
  width: 6px;
  height: 1.1em;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

/* ---------- 余白の案内所（広い画面：記事の右の余白に目次を開く） ---------- */
.fold-guide { display: none; }
@media (min-width: 1300px) {
  .fold-guide {
    display: block;
    position: fixed;
    top: 132px;
    left: calc(50% + (var(--max-read) / 2) + 40px);
    width: 208px;
    max-height: calc(100vh - 180px);
    overflow: auto;
    z-index: 20;
    padding: 18px 16px 16px;
    background: var(--paper);
    background-image: var(--grain);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s var(--ease-fold), transform .3s var(--ease-fold);
    font-size: 13px;
    line-height: 1.55;
  }
  .fold-guide.is-shown { opacity: 1; transform: none; }
  .fold-guide::before {                     /* 右上の折り返した角 */
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: var(--dogear);
    height: var(--dogear);
    background: linear-gradient(225deg, var(--white) 0 50%, var(--fog-deep) 50% 100%);
    border-bottom-left-radius: 2px;
  }
  .fold-guide__bird {
    position: absolute;
    top: -34px;
    left: 10px;
    width: 52px;
    height: auto;
    pointer-events: none;
  }
  .fold-guide__title {
    margin: 0 0 10px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--muted);
  }
  .fold-guide__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 12px;
    border-left: 2px solid var(--fog-deep);
  }
  .fold-guide__list li + li { margin-top: 6px; }
  .fold-guide__list a {
    position: relative;
    display: block;
    color: var(--muted);
    text-decoration: none;
  }
  .fold-guide__list a:hover { color: var(--link-blue); text-decoration: underline; }
  .fold-guide__list a.is-current { color: var(--navy); font-weight: 700; }
  .fold-guide__list a.is-current::before {   /* 黄色いしおり */
    content: "";
    position: absolute;
    left: -16px;
    top: 0;
    width: 6px;
    height: 100%;
    min-height: 1.3em;
    background: var(--yellow);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  }
  .fold-guide__exits {
    list-style: none;
    margin: 14px 0 0;
    padding: 12px 0 0;
    border-top: 1px dashed var(--rule-strong);
  }
  .fold-guide__exits li + li { margin-top: 6px; }
  .fold-guide__exits a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--link-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .fold-guide__exits .fold-guide__mark {
    flex: 0 0 12px;
    height: 12px;
    border: 1.5px dashed var(--muted);
    border-radius: 2px;
  }
  .fold-guide__exits .fold-guide__mark--door {
    border: 0;
    background: linear-gradient(90deg, var(--navy) 0 3px, transparent 3px) , var(--fog-deep);
  }
  .fold-guide__top {
    margin-top: 12px;
    font-size: 12px;
  }
  .fold-guide__top a { color: var(--muted); }
  body.is-quiet .fold-guide__bird { display: none; }
  body.is-quiet .fold-guide { top: 110px; }
}

/* ---------- 掛け合い：キャラクターごとの紙の色 ---------- */
.ens-talk__bubble {
  border-left: 3px solid var(--ens-c, var(--blue));
  background: color-mix(in srgb, var(--ens-c2, var(--fog)) 34%, var(--white));
}
.ens-talk__name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ens-talk__name::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--ens-c, var(--blue));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);   /* 折り紙のひし形 */
}
.ens-talk__turn--oriuka   { --ens-c: var(--blue);      --ens-c2: var(--fog); }
.ens-talk__turn--taburi   { --ens-c: var(--c-taburi);  --ens-c2: var(--c-taburi-2); }
.ens-talk__turn--yorikune { --ens-c: var(--c-yorikune);--ens-c2: #F7E4D2; }
.ens-talk__turn--suune    { --ens-c: var(--c-suune);   --ens-c2: var(--c-suune-2); }
.ens-talk__turn--shimero  { --ens-c: var(--c-shimero); --ens-c2: #ECE4DA; }
.ens-talk__turn--end .ens-talk__bubble { border-left: 0; border-right: 3px solid var(--ens-c, var(--blue)); background: color-mix(in srgb, var(--ens-c2, var(--fog)) 34%, var(--white)); }
@media (max-width: 600px) {
  .ens-talk__turn--end .ens-talk__bubble { border-right: 0; border-left: 3px solid var(--ens-c, var(--blue)); }
}
.ens-talk__turn--suune .ens-talk__avatar img {             /* スウネの灯り */
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c-suune-glow) 70%, transparent));
}

/* ---------- 開く動き（折り目から開く。動きを減らす設定では出さない） ---------- */
@media (prefers-reduced-motion: no-preference) {
  body:not(.is-quiet) .fold-reveal {
    opacity: 0;
    transform: perspective(700px) rotateX(-8deg) translateY(10px);
    transform-origin: 50% 0;
    transition: opacity .5s var(--ease-fold), transform .6s var(--ease-fold);
  }
  body:not(.is-quiet) .fold-reveal.is-in { opacity: 1; transform: none; }
  body:not(.is-quiet) .ens-talk.fold-reveal .ens-talk__turn { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease-fold); }
  body:not(.is-quiet) .ens-talk.fold-reveal.is-in .ens-talk__turn { opacity: 1; transform: none; }
  body:not(.is-quiet) .ens-talk.fold-reveal.is-in .ens-talk__turn:nth-child(2) { transition-delay: .18s; }
  body:not(.is-quiet) .ens-talk.fold-reveal.is-in .ens-talk__turn:nth-child(3) { transition-delay: .36s; }
  body:not(.is-quiet) .ens-talk.fold-reveal.is-in .ens-talk__turn:nth-child(4) { transition-delay: .54s; }
}

/* ---------- 空白の棚：「この記事で確認できていないこと」 ---------- */
.note--gaps {
  position: relative;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  background-image:
    var(--grain),
    repeating-linear-gradient(90deg, var(--rule-strong) 0 8px, transparent 8px 14px),
    repeating-linear-gradient(90deg, var(--rule-strong) 0 8px, transparent 8px 14px),
    repeating-linear-gradient(0deg,  var(--rule-strong) 0 8px, transparent 8px 14px),
    repeating-linear-gradient(0deg,  var(--rule-strong) 0 8px, transparent 8px 14px);
  background-size: auto, 100% 1px, 100% 1px, 1px 100%, 1px 100%;
  background-position: 0 0, 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}
.note--gaps h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
body:not(.is-quiet) .note--gaps h2::before {                 /* スウネの灯り（小） */
  content: "";
  flex: 0 0 34px;
  height: 34px;
  background: var(--fold-suune, none) center / contain no-repeat;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c-suune-glow) 80%, transparent));
}
.note--gaps .limits-list,
.note--gaps p {
  margin-top: 12px;
}
.note--gaps .limits-list li {
  position: relative;
  list-style: none;
  padding-left: 22px;
}
.note--gaps .limits-list li::before {                        /* 白いまま置く札 */
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 11px;
  height: 11px;
  border: 1.5px dashed var(--muted);
  border-radius: 2px;
  background: var(--white);
}

/* ---------- 出典：ページの外への扉 ---------- */
.sources ol > li {
  position: relative;
  padding-left: 14px;
}
.sources ol > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  bottom: .35em;
  width: 3px;
  background: linear-gradient(var(--navy), var(--navy)) 0 0 / 3px 100% no-repeat;
}
.sources ol > li a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: .8em;
  height: .8em;
  margin-left: .3em;
  vertical-align: -.05em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 2h6v2H4v8h8V8h2v6H2z M9 1h6v6l-2.2-2.2L8.6 9 7 7.4l4.2-4.2z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 2h6v2H4v8h8V8h2v6H2z M9 1h6v6l-2.2-2.2L8.6 9 7 7.4l4.2-4.2z'/></svg>") center / contain no-repeat;
}

/* ---------- ホーム：案内所の帯 ---------- */
.fold-band {
  position: relative;
  padding: 56px 0 60px;
  background-color: var(--paper);
  overflow: hidden;
  border-top: 1px solid var(--rule);
}
.fold-band::before,
.fold-band::after {                               /* 紙を一度たたんで開いた折り目（斜めの谷と山） */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent calc(62% - 1px), var(--crease-dark) calc(62% - 1px), var(--crease-dark) 62%, var(--crease-light) 62%, var(--crease-light) calc(62% + 1px), transparent calc(62% + 1px));
}
.fold-band::after {
  background: linear-gradient(115deg, transparent 62%, rgba(7,59,83,.025) 62%);
}
.fold-band__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: center;
}
.fold-band__kicker {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--blue);
}
.fold-band__title {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.45;
  color: var(--navy);
}
.fold-band__text {
  margin: 0 0 20px;
  color: var(--navy);
}
.fold-band__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fold-band__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.fold-band__links a.is-primary { background: var(--navy); color: var(--white); }
.fold-band__links a.is-primary:hover { background: var(--blue); }
.fold-band__links a.is-secondary { color: var(--link-blue); text-decoration: underline; text-underline-offset: 4px; padding-left: 4px; }
.fold-cast {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fold-cast__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px 14px;
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--cast-c, var(--blue));
  text-align: center;
}
.fold-cast__item::after {                           /* 札の角 */
  content: "";
  position: absolute;
  top: -4px;
  right: 0;
  width: 14px;
  height: 14px;
  background: linear-gradient(225deg, var(--paper) 0 50%, var(--fog-deep) 50% 100%);
}
.fold-cast__item:nth-child(odd)  { transform: translateY(10px); }
.fold-cast__fig {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: end center;
}
.fold-cast__fig img { width: 92%; height: auto; }
.fold-cast__name { margin: 8px 0 2px; font-weight: 700; color: var(--navy); font-size: 15px; }
.fold-cast__verb {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .06em;
}
.fold-cast__item--oriuka   { --cast-c: var(--blue); }
.fold-cast__item--taburi   { --cast-c: var(--c-taburi); }
.fold-cast__item--suune    { --cast-c: var(--c-suune); }
.fold-cast__item--yorikune { --cast-c: var(--c-yorikune); }
.fold-cast__item--shimero  { --cast-c: var(--c-shimero-2); }
@media (prefers-reduced-motion: no-preference) {
  .fold-cast__item { transition: transform .3s var(--ease-fold); }
  .fold-cast__item:hover { transform: translateY(-4px) rotate(-1deg); }
  .fold-cast__item:nth-child(odd):hover { transform: translateY(4px) rotate(1deg); }
}
@media (max-width: 900px) {
  .fold-band__inner { grid-template-columns: 1fr; gap: 28px; }
  .fold-band__title { font-size: 24px; }
}
@media (max-width: 560px) {
  .fold-band { padding: 40px 0 44px; }
  .fold-cast { grid-template-columns: repeat(5, 132px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .fold-cast__item { scroll-snap-align: start; }
  .fold-cast__item:nth-child(odd) { transform: none; }
}

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  .fold-back, .fold-guide, .card__media::after, .next-read__media::after { transition: none; }
}
/* 重い記事：飾りを出さない（しおり・帰り道・目次は読む道具なので残す） */
body.is-quiet .ens-talk__turn--suune .ens-talk__avatar img { filter: none; }
@media print {
  .fold-progress, .fold-back, .fold-guide { display: none !important; }
}

/* ==========================================================================
   トップの編集型の構成（inc/front-editorial.php）
   ========================================================================== */
.ed-hero {
  position: relative;
  padding: 48px 0 56px;
  background: var(--paper);
  background-image: var(--grain);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.ed-hero::after {                                  /* 右下へ抜ける一本の折り目 */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, transparent calc(70% - 1px), var(--crease-dark) calc(70% - 1px), var(--crease-dark) 70%, var(--crease-light) 70%, var(--crease-light) calc(70% + 1px), transparent calc(70% + 1px));
}
.ed-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 48px;
  align-items: end;
}
.ed-hero__title { margin: 0; }
.ed-hero__name {
  display: block;
  margin-bottom: 18px;
  font: 700 13px/1 var(--font-latin);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue);
}
.ed-hero__catch {
  display: block;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.32;
  letter-spacing: .01em;
  color: var(--navy);
}
.ed-hero__catch::after {                           /* 黄色いしおりの一片 */
  content: "";
  display: block;
  width: 56px;
  height: 6px;
  margin-top: 22px;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.ed-hero__sub {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.9;
  color: var(--navy);
}
.ed-feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.ed-feature__media { display: block; position: relative; min-height: 100%; background: var(--fog-deep); }
.ed-feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.ed-feature__media::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(225deg, var(--white) 0 50%, var(--fog-deep) 50% 100%);
}
.ed-feature__body { padding: 24px 24px 20px; display: flex; flex-direction: column; }
.ed-feature__kicker {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--blue);
}
.ed-feature__title { margin: 0 0 10px; font-size: 26px; line-height: 1.4; }
.ed-feature__title a { color: var(--navy); text-decoration: none; }
.ed-feature__title a:hover { text-decoration: underline; text-underline-offset: 5px; }
.ed-feature__text { margin: 0 0 14px; font-size: 15px; line-height: 1.8; color: var(--navy); }
.ed-feature__list {
  list-style: none;
  margin: auto 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--rule-strong);
  font-size: 14px;
  line-height: 1.55;
}
.ed-feature__list li + li { margin-top: 8px; }
.ed-feature__list a { color: var(--link-blue); }
.ed-feature__credit { margin: 12px 0 0; font-size: 11px; color: var(--muted); }
@media (max-width: 960px) {
  .ed-hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .ed-feature { grid-template-columns: 1fr; }
  .ed-feature__media img { aspect-ratio: 16 / 9; }
}

/* 目的別の入口：三枚の札 */
.ed-doors { padding: 48px 0 16px; }
.ed-doors__title {
  margin: 0 0 20px;
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 700;
}
.ed-doors__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ed-door {
  position: relative;
  padding: 22px 22px 18px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  border-top: 5px solid var(--door-c, var(--blue));
}
.ed-door::after {                                   /* 札の角 */
  content: "";
  position: absolute;
  top: -5px;
  right: -1px;
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, var(--white) 0 50%, var(--fog-deep) 50% 100%);
}
.ed-door:nth-child(1) { --door-c: var(--blue); }
.ed-door:nth-child(2) { --door-c: var(--cyan); }
.ed-door:nth-child(3) { --door-c: var(--yellow); }
.ed-door__num { margin: 0; font: 700 12px/1 var(--font-latin); letter-spacing: .12em; color: var(--muted); }
.ed-door__label { margin: 6px 0 6px; font-size: 22px; line-height: 1.4; }
.ed-door__label a { color: var(--navy); text-decoration: none; }
.ed-door__label a::after { content: " →"; color: var(--blue); }
.ed-door__label a:hover { text-decoration: underline; text-underline-offset: 5px; }
.ed-door__desc { margin: 0 0 12px; font-size: 14px; line-height: 1.75; color: var(--muted); }
.ed-door__links { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.55; }
.ed-door__links li { padding: 8px 0; border-top: 1px solid var(--rule); }
.ed-door__links a { color: var(--navy); text-decoration: none; }
.ed-door__links a:hover { color: var(--link-blue); text-decoration: underline; }
@media (max-width: 900px) { .ed-doors__list { grid-template-columns: 1fr; } }

/* 編集部の3本 */
.ed-picks__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ed-picks__list .card__title { font-size: 19px; }
@media (max-width: 900px) { .ed-picks__list { grid-template-columns: 1fr; } }

/* ほかの読み方 */
.ed-ways { padding: 8px 0 48px; }
.ed-ways__title { margin: 0 0 16px; font-size: 14px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.ed-ways__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ed-way__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px 18px 16px 22px;
  background: var(--fog);
  background-image: var(--grain);
  border-radius: var(--radius);
  color: var(--navy);
  text-decoration: none;
  position: relative;
}
.ed-way__link::before {                               /* 青い帰りのタブ */
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 24px;
  background: var(--blue);
  border-radius: 0 2px 2px 0;
}
.ed-way__link:hover { background-color: var(--fog-deep); }
.ed-way__label { font-weight: 700; font-size: 16px; }
.ed-way__desc { font-size: 13px; line-height: 1.6; color: var(--muted); }

/* 調整（プレビュー後） */
.ed-hero__grid { align-items: center; }
.ed-hero__copy { position: relative; }
.ed-hero__catch, .ed-feature__title, .ed-door__label, .fold-band__title { word-break: auto-phrase; }
.ed-hero__lead { margin: 14px 0 0; font-size: 15px; line-height: 1.8; color: var(--muted); }
.ed-hero__bird { display: block; width: 104px; margin-top: 24px; }
.ed-hero__bird img { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .ed-hero__bird { animation: fold-bob 5s ease-in-out infinite; transform-origin: 50% 90%; }
  @keyframes fold-bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-2deg); } }
}
@media (max-width: 960px) { .ed-hero__bird { width: 76px; margin-top: 16px; } }
@media (min-width: 1300px) {
  .fold-guide { overflow: visible; max-height: none; }
  .fold-guide__list { max-height: calc(100vh - 360px); overflow-y: auto; }
}
.single .prose h2[id], .single .prose h3[id], #gaps, #article-notes, .sources li[id] { scroll-margin-top: 104px; }

/* ---------- この記事の答え（inc/answer.php）：黄色いしおりを挟んだ一枚 ---------- */
.answer {
  position: relative;
  margin: 24px 0 8px;
  padding: 20px 24px 16px 28px;
  background: var(--paper);
  background-image: var(--grain);
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}
.answer::before {                                   /* しおり */
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  width: 12px;
  height: 30px;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.answer__title { margin: 6px 0 8px 12px; font-size: 13px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.answer__text { margin: 0; font-size: 18px; line-height: 1.85; color: var(--navy); font-weight: 500; }
.answer__more { margin: 10px 0 0; font-size: 13px; text-align: right; }
.answer__more a { color: var(--link-blue); }

/* ==========================================================================
   日本で出会えるウクライナ（inc/encounters.php・archive-ukr_encounter.php・single-ukr_encounter.php）
   札（カード）は .ed-door と同じ「上辺の色帯＋札の角」。区分の見出しは折り目の罫（谷と山の二本線）。
   掲載の基準は紙の地（--grain）の面。料金が書かれていない件は、空白の棚と同じ点線の札で「主催者に確認」。
   種類の色はブランドの原色だけ（キャラクターの色は、オリュカが出る見出しの吹き出しだけ）。
   ========================================================================== */
.enc-head { margin-bottom: var(--s5); }

/* 掲載の基準：紙の面 */
.enc-rules {
  max-width: var(--max-read);
  margin: 0 auto var(--s4);
  padding: 16px 20px;
  background: var(--paper);
  background-image: var(--grain);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.8;
}
.enc-rules summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  min-height: 32px;
}
.enc-rules__list { margin: 10px 0 0; padding: 0 0 0 1.2em; }
.enc-rules__list li + li { margin-top: 4px; }
.enc-rules__fix { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--rule-strong); font-size: 14px; }
.enc-rules__fix a { color: var(--link-blue); }

/* 種類で絞り込む */
.enc-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 var(--s4);
}
.enc-filter a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font-size: 14px;
  text-decoration: none;
}
.enc-filter a:hover { background: var(--fog); }
.enc-filter a.is-current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.enc-filter__count { font: 500 12px/1 var(--font-latin); opacity: .75; }

/* 区分：折り目の罫 */
.enc-section { margin-top: var(--s6); }
.enc-section__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 var(--s3);
  padding-bottom: 10px;
  font-size: 22px;
  line-height: 1.4;
  color: var(--navy);
  background-image:
    linear-gradient(var(--crease-dark), var(--crease-dark)),
    linear-gradient(var(--crease-light), var(--crease-light));
  background-size: 100% 1px, 100% 1px;
  background-position: 0 calc(100% - 1px), 0 100%;
  background-repeat: no-repeat;
}
.enc-section__title::before {                      /* 黄色いしおりの一片 */
  content: "";
  flex: 0 0 6px;
  height: 1.1em;
  align-self: center;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.enc-section--past .enc-section__title::before { background: var(--blue); }   /* 振り返る区分は青いタブ */
.enc-section__count { font: 500 13px/1 var(--font-latin); color: var(--muted); }
.enc-section__lead { margin: -8px 0 var(--s3); font-size: 14px; color: var(--muted); }

/* 札（カード） */
.enc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.enc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 16px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--enc-c, var(--blue));
  border-radius: var(--radius);
}
.enc-card::after {                                  /* 札の角 */
  content: "";
  position: absolute;
  top: -5px;
  right: -1px;
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, var(--white) 0 50%, var(--fog-deep) 50% 100%);
}
.enc-card--restaurant, .enc-card--cooking_class { --enc-c: var(--yellow); }
.enc-card--event                                { --enc-c: var(--cyan); }
.enc-card--film                                 { --enc-c: var(--navy); }
.enc-card--exhibition                           { --enc-c: var(--link-blue); }
.enc-card--language_course, .enc-card--online   { --enc-c: var(--blue); }
.enc-card.is-past {
  background: var(--paper);
  background-image: var(--grain);
  border-top-color: var(--rule-strong);
}
.enc-card__kicker { margin: 0 0 6px; }
.enc-card__title { margin: 0 0 4px; font-size: 18px; line-height: 1.5; word-break: auto-phrase; }
.enc-card__title a { color: var(--navy); text-decoration: none; }
.enc-card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.enc-card__original { margin: 0 0 8px; font: 400 13px/1.5 var(--font-latin); color: var(--muted); }

.enc-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--fog-deep);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.6;
}

/* 事実の並び */
.enc-facts { margin: 8px 0 0; font-size: 14px; line-height: 1.65; }
.enc-facts__row {
  display: grid;
  grid-template-columns: 3.6em minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--rule);
}
.enc-facts dt { color: var(--muted); font-weight: 500; }
.enc-facts dd { margin: 0; color: var(--navy); overflow-wrap: anywhere; }

/* 料金が書かれていない件：空白の棚の点線の札 */
.enc-fee-ask {
  display: inline-block;
  padding: 0 8px;
  border: 1.5px dashed var(--muted);
  border-radius: 2px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* 注記（細い縁） */
.enc-note {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--yellow);
  background: var(--fog);
  font-size: 13px;
  line-height: 1.7;
  color: var(--navy);
}

/* 確認日と主催者のページ（ページの外への扉） */
.enc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: auto;
  padding-top: 10px;
}
.enc-verified { margin: 0; font-size: 12px; color: var(--muted); }
.enc-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--link-blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.enc-source::before {                              /* 扉：紺の縦線 */
  content: "";
  flex: 0 0 3px;
  height: 1.1em;
  background: var(--navy);
}
.enc-source::after {
  content: "";
  width: .8em;
  height: .8em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 2h6v2H4v8h8V8h2v6H2z M9 1h6v6l-2.2-2.2L8.6 9 7 7.4l4.2-4.2z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 2h6v2H4v8h8V8h2v6H2z M9 1h6v6l-2.2-2.2L8.6 9 7 7.4l4.2-4.2z'/></svg>") center / contain no-repeat;
}
.enc-empty { margin-top: var(--s5); color: var(--muted); }

/* 1件のページ */
.enc-single__head { margin-bottom: var(--s3); }
.enc-single__kicker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.enc-state {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  background: var(--yellow);
  color: var(--navy);
}
.enc-state--past { background: var(--fog-deep); color: var(--muted); }
.enc-single__title { margin: 0; font-size: 32px; line-height: 1.45; word-break: auto-phrase; }
.enc-single__original { margin: 8px 0 0; font: 400 15px/1.5 var(--font-latin); color: var(--muted); }
.enc-single__notice {
  margin: 0 0 var(--s3);
  padding: 10px 14px;
  border-left: 3px solid var(--blue);
  background: var(--fog);
  font-size: 15px;
}
.enc-single__body { margin-bottom: var(--s3); }
.enc-single__card {
  position: relative;
  padding: 8px 20px 12px;
  background: var(--paper);
  background-image: var(--grain);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.enc-single__card::before {                         /* 右上の折り返した角 */
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: var(--dogear);
  height: var(--dogear);
  background: linear-gradient(225deg, var(--white) 0 50%, var(--fog-deep) 50% 100%);
}
.enc-single__card .enc-facts { font-size: 15px; }
.enc-single__card .enc-facts__row:first-child { border-top: 0; }
.enc-single__disclaimer { margin: var(--s3) 0 0; font-size: 13px; color: var(--muted); }
.enc-single__back { margin: var(--s2) 0 0; font-size: 15px; }
.enc-single__back a { color: var(--link-blue); }

@media (max-width: 600px) {
  .enc-list { grid-template-columns: 1fr; }
  .enc-section__title { font-size: 20px; }
  .enc-single__title { font-size: 26px; }
}
