/* QUICK CUSTOMIZATION ZONE */
:root {
  --pagewidth: 70vw;
  --pageheight: 80vh;
  --sidebarwidth: 150px;

  --outerborder: 2px dotted;
  --innerborder: 4px solid;
  --border-radius: 14px;
  --border-radius-2: calc(var(--sidebarwidth) / 2);

  --text-color: #653049;

  --bg-1: #fff1c7;
  --bg-2: #ffd48a;

  --accent-1: #ffbd4a;
  --accent-2: #ffb7c8;
  --accent-3: #e94f76;
  --accent-4: #ff7a3d;

  --border-color: #ec735f;

  --headingfont: "Trebuchet MS";
  --bodyfont: "Verdana";
}

html,
body {
  margin: 0;
  padding: 0;
}

::selection {
  color: var(--bg-1);
  background: var(--accent-3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  scrollbar-color: var(--accent-1) var(--accent-2);
  scrollbar-width: thin;
  max-width: 100%;
}

body {
  font-family: var(--bodyfont), sans-serif;
  color: var(--text-color);
  background-color: #ffecc2;

  background-image:
    linear-gradient(rgba(255, 122, 61, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 79, 118, 0.13) 1px, transparent 1px),
    linear-gradient(45deg, rgba(255, 189, 74, 0.28) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 183, 200, 0.32) 25%, transparent 25%);

  background-size:
    18px 18px,
    18px 18px,
    42px 42px,
    42px 42px;

  font-size: 16px;
}

/* The original Zonelets #container is now arranged like the Yogurt template. */
#container,
.container {
  display: grid;
  grid-template-areas:
    "head ."
    "main side"
    "main side"
    "foot side";
  width: var(--pagewidth);
  height: var(--pageheight);
  margin: calc((100vh - var(--pageheight)) / 2) auto;
  max-width: calc(70rem + var(--sidebarwidth));
  grid-template-columns: minmax(0, 1fr) var(--sidebarwidth);
  grid-template-rows: auto 1fr auto;
  gap: 2px;
}

/* Static visual title added in the HTML. The dynamic Zonelets links still use #header below. */
#site-title {
  grid-area: head;
  background: linear-gradient(90deg, #ffbd4a, #ff9f6e, #ffb7c8);
  outline: var(--outerborder) var(--border-color);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  font-family: var(--headingfont), sans-serif;
  font-size: 135%;
  text-align: center;
  align-content: center;
  justify-content: center;
  overflow: hidden;
  font-weight: bold;
  letter-spacing: 1px;
  color: #653049;
  text-shadow:
    1px 1px 0 #fff4dc,
    2px 2px 0 #ffcf6a;
}

#site-title span {
  display: block;
  padding: 5px;
}

#site-icon {
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
}

#site-icon img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;

  border: 5px solid #fffaf0;
  outline: 2px dotted var(--border-color);

  border-radius: 0 var(--border-radius-2) 0 0;
  box-shadow: none;
  margin-top: 0;
}

/* Zonelets injects the Home / Archive / About links into #header with JavaScript. */
#header {
  background: #fff4dc;
  outline: none;
  border-radius: 0;
  overflow: hidden;
}

#header::before {
  content: "menu!";
  display: block;
  padding: 8px 10px;

  background: linear-gradient(90deg, #ffbd4a, #ffb7c8);
  color: #653049;

  font-family: var(--headingfont), sans-serif;
  font-weight: bold;

  border-top: 3px dotted var(--border-color);
  border-bottom: 3px solid #ffe0b2;
}

#header ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#header li {
  margin: 0;
}

#header li:not(:first-child) {
  border-top: var(--innerborder) var(--accent-2);
}

#header a {
  display: block;
  padding: 8px 10px;

  background: #fff4dc;
  color: #d93f68;

  text-decoration: none;
  border-bottom: 1px dotted #ff8a75;
}

#header a:hover,
#header a:focus {
  background: #ffe0b2;
  color: #b93157;
  padding-left: 14px;
}

#sidebar-recent {
  background: #fff4dc;
  margin: 0;
  padding: 0;
  outline: none;
  border-radius: 0;
}

#sidebar-recent h2 {
  font-size: 1rem;
  padding: 8px 10px;
  margin: 0;
  background: linear-gradient(90deg, #ffbd4a, #ffb7c8);
  color: #653049;
}

#sidebar-recent ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar-recent li {
  padding: 8px 10px;
  border-bottom: 1px dotted #ff8a75;
  background: #fff4dc;
}

#sidebar-recent a {
  color: #d93f68;
  font-size: 0.9rem;
}

/* Zonelets content area, styled as Yogurt's main panel. */
#content,
main {
  grid-area: main;
  background:
    linear-gradient(rgba(255, 183, 200, 0.35) 1px, transparent 1px), #fff4dc;
  background-size: 100% 28px;
  border: var(--innerborder) #ffc3cf;
  outline: var(--outerborder) var(--border-color);
  overflow-y: auto;
  max-height: 100%;
  padding-bottom: 1rem;
}

#content {
  position: relative;
}

#content,
main,
p {
  text-align: justify;
}

#content::before {
  content: "☆ ♡ ✿";
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 0.9rem;
  color: #ff9b54;
  opacity: 0.75;
  pointer-events: none;
}

#aboutSectionFullBodyPic {
  width: 40%;
  float: right;
  padding-left: 3%;
}

.taste {
  display: flex; /* Ativa o alinhamento lado a lado */
  gap: 1%;      /* Espaçamento entre as caixas */
}

.taste .container{
  width: 200px; /* Largura do retângulo */
  height: 150px; /* Altura do retângulo */
  background-color: var(--accent-2); /* Cor de fundo */
  border: 3px dotted var(--accent-3);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 0;
  padding: 1px;
  margin-top: 2% ;
  margin-left: 2%;
  margin-right: 0%;
}

.taste h2 {
  margin-bottom: 0.1rem;
}

.taste ul {
  margin: 0;
  padding-left: 1.5rem;
}

#footer {
  grid-area: foot;
  background: linear-gradient(90deg, #ffbd4a, #ff9f6e, #ffb7c8);
  outline: var(--outerborder) var(--border-color);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  color: #653049;
}

#footer p {
  margin: 4px;
  font-size: 80%;
  padding: 0.35rem 0.5rem;
  text-align: center;
}

#footer hr {
  display: none;
}

#footer a {
  color: inherit;
}

/* Typography and content elements */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--headingfont), sans-serif;
  padding: 0.65rem 1rem;
  margin: 0;
  line-height: 1.1;
  border-bottom: 3px dotted #ffb6c7;
}

h1,
h3,
h5 {
  background: linear-gradient(90deg, #ffd2dc, #ffe0b2);
  color: #e94f76;
  border-bottom: 3px dotted #ff8a75;
}

h2,
h4 {
  background: linear-gradient(90deg, #ffcf6a, #ffc3cf);
  color: #653049;
  border-bottom: 3px dotted #ff8a75;
}

h2,
h3,
h4,
h5 {
  margin: 1rem 0;
}

a {
  color: #d93f68;
  text-decoration-color: #ff7a3d;
  text-decoration-style: dotted;
  font-weight: bold;
}

a:hover,
a:focus {
  color: #ff6a2f;
}

#content a:hover,
#content a:focus {
  top: 1px;
  box-shadow: inset 0 -6px #fff0c9;
}

p,
ul,
ol,
dl,
details,
table,
pre code,
blockquote {
  margin: 1rem;
}

p,
li,
dd,
dt,
cite,
code {
  line-height: 1.4;
}

sup,
sub {
  line-height: 0;
}

s,
del {
  text-decoration-color: var(--accent-1);
  text-decoration-thickness: 2px;
}

ul,
ol {
  padding-left: 1rem;
}

ul ul,
ol ul {
  margin: 0;
}

li {
  margin: 0;
}

dd {
  margin-left: 1rem;
}

dd + dt {
  margin-top: 0.5rem;
}

hr {
  border: solid var(--accent-1);
  border-width: 2px 0 0 0;
  margin: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

table {
  border: 2px solid var(--bg-2);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

th,
td {
  padding: 3px 5px;
}

th {
  color: var(--text-color);
  background: var(--accent-1);
  border: 2px solid var(--border-color);
}

td {
  background: var(--accent-2);
}

code {
  display: inline-block;
  border-radius: var(--border-radius);
  padding: 2px 5px;
  background: var(--bg-2);
}

pre code {
  display: block;
  overflow-x: auto;
}

details {
  border: var(--outerborder) var(--border-color);
  border-radius: var(--border-radius);
}

summary {
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--border-radius);
}

summary:hover {
  background: var(--bg-2);
}

details[open] summary {
  margin-bottom: -0.5rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

blockquote {
  border-left: var(--innerborder) var(--accent-1);
  border-radius: var(--border-radius);
  padding: 0.25rem 0.5rem;
}

blockquote p,
blockquote cite {
  margin: 0.5rem;
  display: block;
}

.tastes .container, h2 {
  background: transparent;
  border-bottom: none;
  margin-top: 1%;
}


/* Zonelets-specific sections */
#recentpostlistdiv h2 {
  margin: 0;
  padding: 8px 10px;

  font-size: 1rem;
  background: linear-gradient(90deg, #ffbd4a, #ffb7c8);
  color: #653049;

  border-top: 3px dotted var(--border-color);
  border-bottom: 3px solid #ffe0b2;
}

#recentpostlistdiv ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#recentpostlistdiv li {
  margin: 0;
  padding: 8px 10px;

  background: #fff4dc;
  border-bottom: 1px dotted #ff8a75;
}

#recentpostlistdiv li:last-child {
  border-bottom: none;
  margin-bottom: 18px;
}

#recentpostlistdiv a {
  color: #d93f68;
  font-size: 0.85rem;
  line-height: 1.4;
}

#postlistdiv ul {
  font-size: 1.2em;
  padding: 0;
  list-style-type: none;
}

#postlistdiv li {
  margin: 0.55rem 1rem;
  padding: 0.35rem 0.5rem;
  background: #fffaf0;
  border-left: 5px solid #ffd36e;
  border-bottom: 1px dotted #ffb6c7;
}

.moreposts {
  font-size: 0.8em;
  margin-top: 0.2em;
}

#nextprev {
  text-align: center;
  margin-top: 1.4em;
}

#disqus_thread {
  margin: 1.6em 1rem 0 1rem;
}

/* Original Zonelets helper classes preserved. */
.right {
  float: right;
  margin-left: 1em;
}

.left {
  float: left;
  margin-right: 1em;
}

.center {
  display: block;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.caption {
  margin-top: 0;
  font-size: 0.9em;
  font-style: italic;
}

#sidebar {
  grid-area: side;
  align-self: start;

  background: #fff4dc;
  outline: var(--outerborder) var(--border-color);
  border-radius: 0 var(--border-radius-2) var(--border-radius-2) 0;

  overflow: hidden;

  display: flex;
  flex-direction: column;
}

@media only screen and (min-width: 600px) {
  .small {
    max-width: 60%;
    height: auto;
  }
}

/* Mobile layout from Yogurt, adapted to the Zonelets IDs. */
@media (max-width: 700px) {
  :root {
    --sidebarwidth: 125px;
  }

  #container,
  .container {
    grid-template-areas:
      "head icon"
      "nav nav"
      "main main"
      "foot foot";
    width: calc(100% - 20px);
    height: fit-content;
    margin: 10px;
    grid-template-columns: auto var(--sidebarwidth);
    grid-template-rows: var(--sidebarwidth) min-content auto min-content;
  }

  #header {
    border-radius: 0;
  }

  #header ul {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }

  #header li:not(:first-child) {
    border-top: 0;
    border-left: var(--innerborder) var(--accent-2);
  }

  #site-title {
    border-radius: var(--border-radius) 0 0 0;
  }

  #site-icon img {
    border-radius: 0 var(--border-radius) 0 0;
  }

  #content,
  main {
    overflow-y: visible;
    max-height: none;
  }
}

@media (max-width: 800px) {
  body {
    padding: 10px;
  }

  #container {
    width: min(100%, 720px);
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "head"
      "side"
      "main"
      "foot";
  }

  #site-title {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
  }

  #sidebar {
    width: 100%;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    display: grid;
    grid-template-columns: minmax(110px, 35%) 1fr;
    grid-template-areas:
      "icon nav"
      "recent recent";
  }

  #site-icon {
    grid-area: icon;
  }

  #site-icon img {
    height: 100%;
    aspect-ratio: 1 / 1;
  }

  #header {
    grid-area: nav;
  }

  #sidebar-recent {
    grid-area: recent;
  }

  #recentpostlistdiv ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  #content {
    overflow-y: visible;
    max-height: none;
    min-height: 35vh;
  }
  .right {
    float: none;
    display: block;
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .small {
    max-width: calc(100% - 2rem);
  }
}

@media screen and (max-width: 700px) {
  :root {
    --pagewidth: 90vw;
    --pageheight: auto;
    --sidebarwidth: 130px;
  }

  #container {
    width: var(--pagewidth);
    min-height: auto;

    display: grid;
    grid-template-columns: 1fr 130px;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "head icon"
      "nav nav"
      "main main"
      "foot foot";

    margin: 1.5rem auto;
  }

  /*
    Isso faz a sidebar deixar de ser uma caixa única no mobile.
    Os filhos dela passam a entrar diretamente no grid do #container.
  */
  #sidebar {
    display: contents;
  }

  #site-title {
    grid-area: head;

    min-height: 120px;
    border-radius: var(--border-radius) 0 0 0;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    padding: 1rem;
  }

  #site-icon {
    grid-area: icon;

    margin: 0;
    padding: 0;
    outline: var(--outerborder) var(--border-color);
    border-radius: 0 var(--border-radius) 0 0;
    overflow: hidden;
  }

  #site-icon img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
  }

  #header {
    grid-area: nav;

    outline: var(--outerborder) var(--border-color);
    border-radius: 0;
    overflow: hidden;
    background: #fff4dc;
  }

  #header::before {
    display: block;
  }

  #header ul {
    display: flex;
    flex-wrap: wrap;

    margin: 0;
    padding: 0;
    list-style: none;
  }

  #header li {
    flex: 1 1 auto;
    margin: 0;
  }

  #header a {
    text-align: center;
    border-bottom: none;
    border-right: 3px solid #ffc3cf;
    padding: 10px 12px;
  }

  #header li:last-child a {
    border-right: none;
  }

  /*
    Esconde os posts recentes da lateral no responsivo.
  */
  #sidebar-recent {
    display: none;
  }

  #content,
  main {
    grid-area: main;

    max-height: none;
    min-height: 260px;

    border-radius: 0;
  }

  #footer {
    grid-area: foot;

    border-radius: 0 0 var(--border-radius) var(--border-radius);
    text-align: center;
    padding: 0.8rem;
  }
}

/* Archive folder page */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin: 1.4rem;
}

.folder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 190px;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  background: #fff4dc;
  border: 3px dotted var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 4px 4px 0 #ffcf6a;
}

.folder-card:hover,
.folder-card:focus {
  transform: translateY(2px);
  box-shadow: 2px 2px 0 #ffcf6a;
}

.folder-card img {
  width: 96px;
  height: auto;
  margin: 0 0 0.6rem;
}

.folder-card span {
  display: block;
  color: #d93f68;
  font-family: var(--headingfont), sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
}

.folder-card small {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-color);
  font-size: 0.8rem;
  font-weight: normal;
}

.archive-back {
  margin: 1rem;
}

.review-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.4rem;
}

.review-card {
  background: #fff4dc;
  border: 3px dotted var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
}

.review-card h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  background: transparent;
  border-bottom: none;
  color: #d93f68;
}

.review-meta {
  margin: 0 0 0.8rem;
  color: #653049;
  font-size: 0.9rem;
  font-weight: bold;
}

@media screen and (max-width: 700px) {
  .folder-grid,
  .review-catalog {
    grid-template-columns: 1fr;
    margin: 1rem;
  }

  .folder-card {
    min-height: 0;
  }
}

/* Manga review catalog */
.catalog-intro {
  margin: 1rem 1.4rem 0;
  max-width: 42rem;
  text-align: left;
}

.manga-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.4rem;
}

.manga-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;

  min-height: 180px;
  padding: 0.85rem;

  color: var(--text-color);
  text-decoration: none;
  background: #fffaf0;
  border: 3px dotted var(--border-color);
  border-radius: 18px;
  box-shadow: 4px 4px 0 #ffcf6a;
}

.manga-card:hover,
.manga-card:focus {
  transform: translateY(2px);
  box-shadow: 2px 2px 0 #ffcf6a;
  background: #fff4dc;
}

.manga-card-cover {
  width: 100%;
  height: 150px;
  margin: 0;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  border: 3px solid #fff4dc;
  outline: 2px dotted #ff8a75;
}

.manga-card-info h2 {
  margin: 0 0 0.15rem;
  padding: 0;
  background: transparent;
  border: none;
  color: #d93f68;
  font-size: 1.25rem;
}

.manga-card-subtitle,
.manga-meter,
.manga-genre {
  margin: 0.25rem 0;
  text-align: left;
}

.manga-card-subtitle {
  font-size: 0.9rem;
  font-weight: bold;
  color: #653049;
}

.manga-label {
  display: inline-block;
  min-width: 5.8rem;
  font-size: 0.78rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7a3f58;
}

.stars {
  color: #e94f76;
  letter-spacing: 0.03em;
  text-shadow: 1px 1px 0 #fff4dc;
}

.peppers {
  color: #ff6a2f;
  letter-spacing: 0.03em;
}

.manga-genre {
  font-size: 0.85rem;
  font-weight: bold;
  color: #7a4a35;
}

.manga-card-button {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #7b553f;
  color: #fffaf0;
  font-size: 0.85rem;
  font-weight: bold;
}

/* Individual manga review pages */
.manga-detail {
  margin: 1.4rem;
}

.manga-detail p,
.manga-detail dd,
.manga-detail dt {
  text-align: left;
}

.manga-detail-hero {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;

  padding: 1rem;
  background: #fffaf0;
  border: 3px dotted var(--border-color);
  border-radius: 18px;
  box-shadow: 4px 4px 0 #ffcf6a;
}

.manga-detail-cover {
  width: 100%;
  margin: 0;
  border-radius: 14px;
  border: 4px solid #fff4dc;
  outline: 2px dotted #ff8a75;
}

.manga-detail-info h1 {
  margin: 0 0 0.8rem;
  padding: 0;
  background: transparent;
  border: none;
  color: #d93f68;
}

.manga-facts {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.manga-facts div {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  padding-bottom: 0.4rem;
  border-bottom: 1px dotted #ff8a75;
}

.manga-facts dt {
  margin: 0;
  font-weight: bold;
  color: #653049;
}

.manga-facts dd {
  margin: 0;
}

.manga-synopsis {
  padding: 0.75rem;
  background: #fff4dc;
  border-radius: 14px;
}

.manga-synopsis h2,
.manga-review-text h2 {
  margin: 0 0 0.6rem;
  padding: 0;
  background: transparent;
  border: none;
  color: #653049;
}

.manga-synopsis p,
.manga-review-text p {
  margin: 0 0 0.8rem;
}

.manga-review-text {
  margin-top: 1rem;
  padding: 1rem;
  background: #fffaf0;
  border: 3px dotted var(--border-color);
  border-radius: 18px;
}

@media screen and (max-width: 700px) {
  .manga-catalog {
    grid-template-columns: 1fr;
    margin: 1rem;
  }

  .manga-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.8rem;
    min-height: 0;
  }

  .manga-card-cover {
    height: 130px;
  }

  .manga-label {
    display: block;
    min-width: 0;
    margin-bottom: 0.1rem;
  }

  .manga-detail {
    margin: 1rem;
  }

  .manga-detail-hero {
    grid-template-columns: 1fr;
  }

  .manga-detail-cover {
    max-width: 240px;
    margin: 0 auto;
  }

  .manga-facts div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* Dynamic manga review helpers */
.stars-icon,
.peppers-icon {
  display: inline-block;
  margin-right: 0.05rem;
}

.stars-icon.is-empty,
.peppers-icon.is-empty {
  opacity: 0.28;
  filter: grayscale(0.4);
}

#mangaCatalog > p,
#mangaReviewPage > p {
  text-align: left;
}

#mangaReviewPage h1 {
  margin-bottom: 1rem;
}
