/*
Theme Name: Twin&Tine
Theme URI: https://twinandtine.com
Author: Twin&Tine
Description: A minimalist, Western-style showcase theme for book publishers. Features modern typography and responsive design.
Version: 1.1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dolphin-press
*/

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background-color: #f9f8f4;
  color: #1a1a1a;
}

/* Selection */
::selection {
  background-color: #cbd5e1;
  color: #0f172a;
}

/* #reviews: ??????????????????1fr ???????????????? Tailwind flex ??????*/
#reviews .dolphin-testimonial-grid {
  display: grid;
  align-items: stretch;
  gap: 2rem;
}
@media (min-width: 768px) {
  #reviews .dolphin-testimonial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* ?????Grid ?? = ?? | ??????????) | ??????flex+flex-1 ??????????*/
#reviews .dolphin-testimonial-card {
  box-sizing: border-box;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: stretch;
  gap: 1.5rem;
  height: 100%;
  min-height: 0;
}
#reviews .dolphin-testimonial-card .dolphin-testimonial-stars {
  min-width: 0;
}
#reviews .dolphin-testimonial-card .dolphin-testimonial-quote {
  margin: 0;
  min-height: 0;
  align-self: stretch;
}
#reviews .dolphin-testimonial-card .dolphin-testimonial-footer {
  min-width: 0;
  align-self: stretch;
  /* ?????? flex ???? Tailwind ??????*/
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ???? / ?????/ ????/ ?? About????????? */
.post-content.prose p,
.reader-article-content.prose p,
.book-sample-content.prose p,
.book-detail-description.prose p {
  text-indent: 2em;
  margin-top: 0;
  margin-bottom: 1.125rem;
}
/* ????????????????????????????? */
.book-sample-content.prose p {
  text-align: justify;
  text-justify: inter-word;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

/* Reader story content: justify text and allow hyphenation */
.reader-article-content.prose p,
.post-content.prose p {
  text-align: justify;
  text-justify: inter-word;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}
.post-content.prose > p:last-child,
.reader-article-content.prose > p:last-child,
.book-sample-content.prose > p:last-child,
.book-detail-description.prose > p:last-child {
  margin-bottom: 0;
}
.post-content.prose blockquote p,
.post-content.prose li p,
.post-content.prose figcaption,
.reader-article-content.prose blockquote p,
.reader-article-content.prose li p,
.reader-article-content.prose figcaption,
.book-sample-content.prose blockquote p,
.book-sample-content.prose li p,
.book-detail-description.prose blockquote p,
.book-detail-description.prose li p {
  text-indent: 0;
}
/* ????????/ ???????????? */
.reader-article-content.prose > p:first-of-type,
.book-sample-content.prose > p:first-of-type {
  text-indent: 0;
}
/* Gutenberg may wrap the first paragraph in .wp-block-group */
.reader-article-content.prose > .wp-block-group:first-child p:first-of-type,
.post-content.prose > .wp-block-group:first-child p:first-of-type,
.book-sample-content.prose > .wp-block-group:first-child p:first-of-type {
  text-indent: 0;
}

/* ????????????80%??.8em????????4rem / text-5xl */
.reader-article-content.prose > p:first-of-type::first-letter {
  font-size: 1.8em;
  font-weight: 700;
  float: left;
  line-height: 1;
  margin-right: 0.35em;
  margin-top: 0.08em;
  color: #0f172a;
}
.reader-article-content.prose > .wp-block-group:first-child p:first-of-type::first-letter,
.post-content.prose > .wp-block-group:first-child p:first-of-type::first-letter,
.book-sample-content.prose > .wp-block-group:first-child p:first-of-type::first-letter {
  font-size: 1.8em;
  font-weight: 700;
  float: left;
  line-height: 1;
  margin-right: 0.35em;
  margin-top: 0.08em;
  color: #0f172a;
}
/* If first paragraph is wrapped in a group, avoid drop-cap on next direct paragraph */
.reader-article-content.prose > .wp-block-group:first-child + p:first-of-type::first-letter,
.post-content.prose > .wp-block-group:first-child + p:first-of-type::first-letter,
.book-sample-content.prose > .wp-block-group:first-child + p:first-of-type::first-letter {
  float: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin-right: 0;
  margin-top: 0;
  color: inherit;
}
/* Disable drop cap specifically on all sample detail pages */
.book-sample-content.prose > p:first-of-type::first-letter,
.book-sample-content.prose > .wp-block-group:first-child p:first-of-type::first-letter {
  float: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin-right: 0;
  margin-top: 0;
  color: inherit;
}
/* Sample detail: restore first paragraph indentation (without drop cap) */
.book-sample-content.prose > p:first-of-type,
.book-sample-content.prose > .wp-block-group:first-child p:first-of-type {
  text-indent: 2em;
}

/* ???????????????- Sample??????Tailwind JIT??*/
@media (max-width: 639px) {
  .dolphin-sample-header-title {
    display: none !important;
  }
}
@media (min-width: 640px) {
  .dolphin-sample-header-title {
    display: block;
  }
}

/* Gutenberg ?????? functions.php ??dolphin-wp-image-align ?????? wp_head ???????? Tailwind ????*/
.reader-article-content figure.wp-block-image.aligncenter,
.reader-article-content .wp-block-image.aligncenter,
.reader-article-content .wp-block-image figure.aligncenter,
.post-content figure.wp-block-image.aligncenter,
.post-content .wp-block-image.aligncenter,
.post-content .wp-block-image figure.aligncenter,
.book-sample-content figure.wp-block-image.aligncenter,
.book-sample-content .wp-block-image.aligncenter,
.book-sample-content .wp-block-image figure.aligncenter,
.reader-article-content div.wp-block-image.aligncenter,
.post-content div.wp-block-image.aligncenter,
.book-sample-content div.wp-block-image.aligncenter {
  display: table;
  margin-left: auto !important;
  margin-right: auto !important;
}
.reader-article-content figure.wp-block-image.aligncenter img,
.reader-article-content .wp-block-image figure.aligncenter img,
.post-content figure.wp-block-image.aligncenter img,
.post-content .wp-block-image figure.aligncenter img,
.book-sample-content figure.wp-block-image.aligncenter img,
.book-sample-content .wp-block-image figure.aligncenter img {
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
}
.reader-article-content figure.aligncenter:not(.wp-block-image),
.post-content figure.aligncenter:not(.wp-block-image),
.book-sample-content figure.aligncenter:not(.wp-block-image) {
  display: table;
  margin-left: auto !important;
  margin-right: auto !important;
}
.reader-article-content .has-text-align-center img,
.post-content .has-text-align-center img,
.book-sample-content .has-text-align-center img {
  margin-left: auto;
  margin-right: auto;
}
.reader-article-content p.aligncenter,
.post-content p.aligncenter,
.book-sample-content p.aligncenter {
  text-align: center;
}
.reader-article-content p.aligncenter img,
.post-content p.aligncenter img,
.book-sample-content p.aligncenter img {
  display: inline-block;
}

/* Navbar mobile safety: avoid horizontal overflow on narrow screens */
@media (max-width: 767px) {
  #navbar {
    overflow-x: clip;
  }
  #navbar form[role="search"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  #navbar form[role="search"] > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  #navbar input[type="search"] {
    min-width: 0 !important;
  }
}

/* Sample detail: keep heading tags visually bold */
.book-sample-content.prose h1,
.book-sample-content.prose h2,
.book-sample-content.prose h3,
.book-sample-content.prose h4,
.book-sample-content.prose h5,
.book-sample-content.prose h6 {
  font-weight: 700;
  color: #0f172a;
}
.book-sample-content.prose h1,
.book-sample-content.prose h2 {
  font-weight: 800;
}

