/* Kaeru Voice Card Front CSS v0.3.1 */

:root{
  --voice-green:#32692d;
  --voice-leaf:#678c50;
  --voice-cream:#faf8f4;
  --voice-paper:#fffdf8;
  --voice-ink:#253023;
  --voice-muted:#697267;
  --voice-line:#d7e2cf;
  --voice-shadow:0 12px 26px rgba(39,72,37,.11);
  --font-heading:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN","HGS明朝E",serif;
  --font-body:"Noto Sans JP","Yu Gothic","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
  --icon-male:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='31' fill='%23e7f1f8'/%3E%3Ccircle cx='32' cy='23' r='10' fill='%235d8fb7'/%3E%3Cpath d='M15 52c3.2-10.8 10.2-17 17-17s13.8 6.2 17 17' fill='%235d8fb7'/%3E%3C/svg%3E");
  --icon-female:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='31' fill='%23fae9ec'/%3E%3Ccircle cx='32' cy='23' r='10' fill='%23d58493'/%3E%3Cpath d='M15 52c3.2-10.8 10.2-17 17-17s13.8 6.2 17 17' fill='%23d58493'/%3E%3C/svg%3E");
}

.voice-paper-card-wrap{
  container-type:inline-size;
  margin:0 0 26px;
}

.voice-paper-card{
  position:relative;
  display:grid;
  grid-template-columns:minmax(330px,42%) minmax(0,1fr);
  gap:0;
  margin:0;
  overflow:hidden;
  border:1px solid rgba(103,140,80,.30);
  border-radius:8px;
  background:rgba(255,253,248,.97);
  box-shadow:var(--voice-shadow);
  font-family:var(--font-body);
  color:var(--voice-ink);
  line-height:1.88;
}

.voice-paper-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 94% 92%, rgba(103,140,80,.11), transparent 22%),
    linear-gradient(135deg,rgba(103,140,80,.08),transparent 34%);
}

.voice-paper-card__visual,
.voice-paper-card__content{
  position:relative;
  z-index:1;
}

.voice-paper-card__visual{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:clamp(16px,2.2vw,24px);
  background:
    linear-gradient(145deg,rgba(228,241,219,.92),rgba(250,248,244,.88));
}

.paper-stage{
  position:relative;
  width:100%;
  max-width:520px;
  min-height:390px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:18px;
  overflow:hidden;
  border-radius:6px;
  background:#f7fbf3;
  box-shadow:inset 0 0 0 1px rgba(103,140,80,.10);
}

.paper-stage::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background-image:var(--voice-bg-photo);
  background-repeat:no-repeat;
  background-position:center bottom;
  background-size:cover;
  opacity:1;
  filter:saturate(.95) brightness(1.03);
}

.paper-stage::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:
    linear-gradient(180deg,rgba(255,255,255,.36),rgba(255,255,255,.08) 52%, rgba(255,255,255,.04));
  pointer-events:none;
}

.paper-photo{
  position:relative;
  z-index:1;
  width:min(96%,380px);
  aspect-ratio:3 / 4;
  margin:0;
  border-radius:3px;
  background:#fffef9;
  border:1px solid rgba(201,191,175,.75);
  box-shadow:
    0 14px 26px rgba(30,42,26,.20),
    0 1px 0 rgba(255,255,255,.98) inset;
  transform:rotate(-3.2deg);
  overflow:hidden;
}

.paper-photo::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:7px -8px -9px 8px;
  border-radius:3px;
  background:#f4efe6;
  border:1px solid rgba(201,191,175,.45);
  box-shadow:0 8px 14px rgba(45,54,36,.08);
  transform:rotate(2.2deg);
}

.paper-photo::after{
  content:"";
  position:absolute;
  right:0;
  bottom:0;
  width:32px;
  height:32px;
  background:
    linear-gradient(135deg,rgba(255,255,255,0) 0 50%,rgba(226,218,202,.72) 51%);
  clip-path:polygon(100% 0,0 100%,100% 100%);
  opacity:.7;
  pointer-events:none;
}

.paper-photo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fffef9;
  filter:brightness(1.045) contrast(1.035) saturate(.96);
}

.paper-photo__shine{
  position:absolute;
  inset:0;
  background:
    linear-gradient(120deg,rgba(255,255,255,.22),transparent 32%),
    radial-gradient(circle at 84% 11%,rgba(255,255,255,.22),transparent 24%);
  pointer-events:none;
}

.voice-paper-card__content{
  padding:clamp(22px,3vw,34px);
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}

.voice-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 13px;
}

.voice-tag{
  display:inline-flex;
  align-items:center;
  min-height:29px;
  padding:4px 12px;
  border-radius:4px;
  background:#678c50;
  color:#fff;
  border:none;
  box-shadow:0 2px 7px rgba(50,105,45,.13);
  font-size:14px;
  line-height:1.4;
  font-weight:800;
  letter-spacing:.02em;
}

.voice-paper-card .voice-title{
  display:block !important;
  margin:0 0 4px !important;
  padding:0 0 5px !important;
  border:0 !important;
  border-bottom:1px solid rgba(50,105,45,.34) !important;
  background:none !important;
  color:var(--voice-ink) !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN","HGS明朝E",serif !important;
  font-size:clamp(21px,2vw,28px) !important;
  line-height:1.42 !important;
  letter-spacing:.04em !important;
  font-weight:700 !important;
}

.voice-paper-card .voice-meta{
  display:flex !important;
  flex-wrap:nowrap;
  align-items:center;
  gap:8px;
  margin:0 0 12px !important;
  padding:0 !important;
  color:var(--voice-muted);
  font-family:var(--font-body);
  font-size:15px;
  font-weight:500;
}

.voice-meta__text{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:0;
  min-width:0;
}

.voice-meta__sep{
  color:rgba(105,114,103,.48);
  margin:0 .55em;
}

.voice-gender-icon{
  width:30px;
  height:30px;
  flex:0 0 30px;
  display:inline-block;
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.06));
}

.voice-gender-icon.is-male{
  background-image:var(--icon-male);
}

.voice-gender-icon.is-female{
  background-image:var(--icon-female);
}

.voice-excerpt{
  position:relative;
  display:block;
  margin:0;
  padding:12px 0 12px 15px;
  border:none;
  border-left:4px solid rgba(103,140,80,.42);
  border-radius:0;
  background:
    linear-gradient(90deg,rgba(241,248,235,.82),rgba(255,253,248,0));
  color:#414a3f;
  font-size:14px;
  line-height:1.75;
}

.voice-readmore{
  margin:20px 0 0;
}

.voice-readmore summary{
  cursor:pointer;
  list-style:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:45px;
  padding:9px 24px;
  border-radius:9px;
  background:linear-gradient(135deg,var(--voice-leaf),var(--voice-green));
  color:#fff;
  font-weight:800;
  box-shadow:0 6px 14px rgba(50,105,45,.18);
  letter-spacing:.02em;
}

.voice-readmore summary::-webkit-details-marker{display:none}

.voice-readmore summary::after{
  content:"";
  display:inline-block;
  width:8px;
  height:8px;
  margin-left:4px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
  transition:transform .18s ease;
}

.voice-readmore[open] summary::after{
  transform:rotate(225deg) translateY(2px);
}

.voice-readmore__inner{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--voice-line);
}

.voice-full-text{
  padding:0;
  border:none;
  background:transparent;
  font-size:15px;
  line-height:1.9;
}

.voice-full-text p{
  margin:.9em 0 1.15em;
}

.voice-full-text strong,
.voice-full-text p strong:first-child{
  color:var(--voice-green);
  font-weight:900;
  letter-spacing:.02em;
}

.voice-full-text p strong:first-child{
  display:inline-block;
  margin-bottom:4px;
}

.voice-comment{
  margin-top:16px;
  padding:14px 16px;
  border-radius:6px;
  background:rgba(103,140,80,.08);
  border:1px solid rgba(103,140,80,.22);
  font-size:14px;
  line-height:1.75;
}

.voice-comment p{
  margin:.55em 0 0;
}

.voice-comment__label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-bottom:4px;
  color:var(--voice-green);
  font-weight:900;
}

@container (max-width:720px){
  .voice-paper-card{
    grid-template-columns:1fr;
    border-radius:8px;
  }

  .voice-paper-card__visual{
    padding:20px 20px 0;
  }

  .paper-stage{
    position:relative;
    top:auto;
    max-width:520px;
    min-height:auto;
    aspect-ratio:1 / .82;
    padding:16px;
    margin:0 auto;
  }

  .paper-photo{
    width:min(82%,340px);
    aspect-ratio:3 / 4;
    transform:rotate(-2.4deg);
  }

  .voice-paper-card__content{
    padding:22px 22px 26px;
  }

  .voice-paper-card .voice-title{
    font-size:clamp(23px,4.8vw,30px) !important;
  }
}

/* 古いブラウザ用の保険 */
@media (max-width:720px){
  .voice-paper-card{
    grid-template-columns:1fr;
    border-radius:8px;
  }

  .voice-paper-card__visual{
    padding:20px 20px 0;
  }

  .paper-stage{
    position:relative;
    top:auto;
    max-width:520px;
    min-height:auto;
    aspect-ratio:1 / .82;
    padding:16px;
    margin:0 auto;
  }

  .paper-photo{
    width:min(82%,340px);
    aspect-ratio:3 / 4;
    transform:rotate(-2.4deg);
  }

  .voice-paper-card__content{
    padding:22px 22px 26px;
  }
}


/* v0.2.2: Cocoon本文CSS・見出しCSSに負けないための保険 */
.voice-paper-card h2.voice-title,
.voice-paper-card p.voice-title,
.voice-paper-card .voice-title{
  background:none !important;
  border-top:none !important;
  border-left:none !important;
  text-decoration:none !important;
  box-shadow:none !important;
}

/* v0.2.2: 本文幅836px前後でも2カラムを維持する */
@container (min-width:721px){
  .voice-paper-card{
    grid-template-columns:minmax(330px,42%) minmax(0,1fr) !important;
    align-items:start;
  }

  .voice-paper-card__visual{
    align-self:start;
  }

  .paper-stage{
    position:sticky;
    top:18px;
  }
}


/* v0.2.3: 院長・Marikoコメントの改行・段落を読みやすく */
.voice-comment p{
  margin:.65em 0 0 !important;
  line-height:1.85;
}

.voice-comment p + p{
  margin-top:1em !important;
}


/* v0.2.4: PC幅では感想用紙を大きく、全文展開時も上に残す */
@media (min-width:721px){
  .voice-paper-card{
    align-items:start;
  }

  .voice-paper-card__visual{
    align-self:start;
  }

  .paper-stage{
    position:sticky;
    top:18px;
  }

  .paper-photo{
    width:min(96%,380px);
  }
}


/* v0.3.0: 編集画面内の幅対策 */
.editor-styles-wrapper .voice-paper-card-wrap{
  max-width:100%;
}

.editor-styles-wrapper .voice-paper-card{
  margin-top:18px;
  margin-bottom:18px;
}
