/*
Theme Name: Notebook Realizer 真实日记本 (雅致映像版)
Description: 极致优雅、质感真实的皮面复古笔记本。完全复刻真实照片的色彩、材质和光影。左侧先写流式布局，严格遵守垂直韵律。桌面端特含左侧精美书架阵列。
Version: 7.0
Author: Google AI Studio
*/

.leather-bound {
  background: linear-gradient(
    135deg,
    var(--leather-color-1, #a45a30) 0%,
    var(--leather-color-2, #7d3b16) 100%
  );
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.1),
    inset 0 0 0 6px rgba(255, 255, 255, 0.05),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  background-image:
    url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.12'/%3E%3C/svg%3E"),
    linear-gradient(
      135deg,
      var(--leather-color-1, #ae5e32) 0%,
      var(--leather-color-2, #7b3812) 100%
    );
}

.perspective-container {
  perspective: 3500px;
}

.writing-vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 2px;
}

.diary-entry ~ .diary-entry {
  break-before: column;
}

/* Base CSS Columns setup */
#columns {
  column-fill: auto;
  height: 100%;
}

@media (min-width: 1024px) {
  #columns {
    column-count: 2;
    /* Matches exactly left/right padding so columns jump accurately */
    column-gap: 104px;
  }
}

* {
  break-inside: auto;
}

/* ----------------------------------------------------
   STRICT TYPOGRAPHY LOCK DOWN (32px Vertical Rhythm)
------------------------------------------------------- */
.diary-content {
  font-size: 17px;
  color: #42352b; /* Ink brown */
  letter-spacing: 1.5px;
  font-weight: 500;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.diary-content a {
  word-break: break-all;
}

/* Base blocks */
.diary-content p,
.diary-content ul,
.diary-content ol {
  margin: 0 0 var(--margin-bottom, 32px) 0; /* Exactly 1 line height */
  padding: 0;
  line-height: var(--diary-line-height, 32px);
}

.diary-content p {
  text-align: justify;
  text-justify: inter-ideograph;
  text-indent: 34px;
}

/* Lists */
.diary-content ul,
.diary-content ol {
  padding-left: 32px;
}
.diary-content li {
  list-style-position: outside;
  margin: 0;
  line-height: var(--diary-line-height, 32px);
  text-indent: 0;
}

/* Headings */
.diary-content h1,
.diary-content h2,
.diary-content h3,
.diary-content h4 {
  text-align: left;
  margin: 0 0 var(--margin-bottom, 32px) 0;
  padding: 0;
  line-height: var(--diary-line-height, 32px);
  font-weight: bold;
  text-indent: 0;
  color: #5d4230;
}

/* Blockquotes */
.diary-content blockquote {
  text-indent: 0;
  padding-left: 16px;
  margin: 0 0 var(--margin-bottom, 32px) 0;
  border-left: 4px solid #bba390;
  color: #796658;
  font-style: italic;
  background: transparent;
  padding-top: 0;
  padding-bottom: 0;
}
.diary-content blockquote p {
  text-indent: 0;
  margin-bottom: 0;
}

/* Forms */
.diary-content input,
.diary-content textarea {
  line-height: var(--diary-line-height, 32px);
  border: 1px solid #e6d8cc;
  background: transparent;
  padding: 0 8px;
  outline: none;
  margin-bottom: var(--margin-bottom, 32px);
  color: #5d4230;
}

/* Links */
.diary-content a {
  color: #8b6b55;
  border-bottom: 1px dotted #a89586;
  transition: all 0.2s;
  text-indent: 0;
}
.diary-content a:hover {
  color: #b45d3b;
  border-bottom-style: solid;
}

/* Media */
.diary-content img,
.diary-content video {
  margin: var(--margin-bottom, 32px) auto var(--margin-bottom, 32px) auto;
  display: block;
  max-height: 40vh;
  border-radius: 2px;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.05);
  break-inside: avoid;
  text-indent: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #eee5dd;
  transform: rotate(-1deg); /* Slight photo imperfection */
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.diary-content img:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.15),
    0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
  position: relative;
}

/* Code & Preformatted */
.diary-content pre {
  background: rgba(0, 0, 0, 0.02);
  padding: 0 16px;
  margin: 0 0 var(--margin-bottom, 32px) 0;
  line-height: var(--diary-line-height, 32px);
  text-indent: 0;
  font-family: monospace;
  overflow-x: auto;
  white-space: pre;
  font-size: 14px;
  border: 1px solid #e6d8cc;
  border-radius: 4px;
}

.diary-content code {
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  color: #b45d3b;
  text-indent: 0;
  font-size: 0.9em;
  border: 1px solid #e6d8cc;
}
