     :root {
      --gr-bg: #F8F6F1;
      --gr-bg-sec: #F3EFE4;
      --gr-parchment: #F3EFE4;
      --gr-dark: #2D2A26;
      --gr-charcoal: #4B5563;
      --gr-muted: #6B7280;
      --gr-border: #E7E0D3;
      --gr-green: #1D4ED8;
      --gr-green-hover: #1E3A8A;
      --gr-link: #1D4ED8;
      --gr-star: #FABE14;
      --gr-accent-success: #2F5D50;
      --font-serif: 'Merriweather', Georgia, serif;
      --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    }

    /* GENERAL RESET */
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: var(--font-sans);
      color: var(--gr-charcoal);
      background-color: var(--gr-bg);
      line-height: 1.5;
      overflow-x: hidden;
      width: 100%;
    }
    a { color: var(--gr-link); text-decoration: none; }
    a:hover { text-decoration: underline; }
    button { cursor: pointer; border: none; background: none; font-family: inherit; }

    /* LAYOUT CONTAINER */
    .container {
      max-width: 1160px;
      margin: 0 auto;
      padding: 0 20px;
      width: 100%;
    }

    /* HEADER */
    header {
      background-color: var(--gr-parchment);
      border-bottom: 1px solid var(--gr-border);
      position: sticky;
      top: 0;
      z-index: 100;
      padding: 10px 0;
      height: 60px;
    }
    .header-flex {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 100%;
    }
    .gr-logo {
      font-family: var(--font-serif);
      font-size: 24px;
      font-weight: 700;
      color: #1D4ED8;
      letter-spacing: -1px;
    }
    .gr-logo:hover {
      text-decoration: none;
    }
    .gr-logo span { 
      font-weight: 300; 
      color: var(--gr-dark);
    }
    .search-container {
      flex: 1;
      max-width: 500px;
      margin: 0 25px;
      position: relative;
    }
    .search-input-wrapper {
      position: relative;
      width: 100%;
    }
    .search-input-wrapper i {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--gr-muted);
      cursor: pointer;
      z-index: 2;
      transition: color 0.15s ease;
    }
    .search-input-wrapper i:hover {
      color: var(--gr-dark);
    }
    .search-bar {
      width: 100%;
      padding: 8px 12px 8px 36px;
      border: 1px solid #D2CEC4;
      border-radius: 4px;
      background-color: #FFFFFF;
      font-size: 13px;
      outline: none;
    }
    .search-bar:focus { border-color: var(--gr-green); }
    .search-results {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: #fff;
      border: 1px solid var(--gr-border);
      border-radius: 0 0 4px 4px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      display: none;
      z-index: 110;
      max-height: 250px;
      overflow-y: auto;
    }
    .search-item {
      padding: 10px 15px;
      display: flex;
      align-items: center;
      gap: 10px;
      border-bottom: 1px solid #f0f0f0;
      cursor: pointer;
    }
    .search-item:hover { background-color: var(--gr-bg-sec); }
    .nav-links {
      display: flex;
      gap: 20px;
      list-style: none;
      align-items: center;
      font-size: 14px;
      font-weight: 500;
    }
    .nav-links a { color: #0F172A; }
    .nav-profile {
      display: flex;
      align-items: center;
      gap: 15px;
    }
    .avatar-header {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background-color: var(--gr-bg-sec);
      color: var(--gr-charcoal);
      border: 1.5px solid #4b5563;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      transition: all 0.2s ease;
      cursor: pointer;
    }
    .avatar-header:hover {
      background-color: var(--gr-border);
      color: var(--gr-dark);
      border-color: var(--gr-muted);
    }

    /* MOBILE NAVIGATION */
    .mobile-header-actions { display: none; }
    .mobile-search-btn { display: none; }
    .mobile-nav-panel {
      position: fixed;
      top: 0;
      left: -280px;
      width: 280px;
      height: 100%;
      background-color: white;
      box-shadow: 4px 0 15px rgba(0,0,0,0.15);
      z-index: 200;
      transition: left 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
      padding: 30px 20px;
    }
    .mobile-nav-panel.open { left: 0; }
    .mobile-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.4);
      z-index: 150;
      display: none;
    }
    .mobile-search-bar-row {
      display: none;
      background-color: var(--gr-parchment);
      padding: 8px 15px;
      border-bottom: 1px solid var(--gr-border);
    }

    /* GRID LAYOUT */
    .book-layout {
      display: grid;
      grid-template-columns: 280px 1fr;
      column-gap: 40px;
      row-gap: 24px;
      padding: 30px 0;
    }

    /* GRID COLUMN PLACEMENTS */
    .left-column-wrapper {
      grid-column: 1;
      grid-row: 1 / span 9;
      display: flex;
      flex-direction: column;
      gap: 20px;
      width: 100%;
    }
    .grid-cover { 
      display: flex;
      justify-content: center;
      width: 100%;
    }
    .grid-sidebar-actions { width: 100%; flex: 1; }
    .grid-header { grid-column: 2; grid-row: 1; }
    .grid-description { grid-column: 2; grid-row: 2; }
    .grid-genres { grid-column: 2; grid-row: 3; }
    .grid-details { grid-column: 2; grid-row: 4; }
    .grid-author { grid-column: 2; grid-row: 5; }
    .grid-related { grid-column: 2; grid-row: 6; }
    .grid-histogram { grid-column: 2; grid-row: 7; }
    .grid-leave-review { grid-column: 2; grid-row: 8; }
    .grid-reviews { grid-column: 2; grid-row: 9; }

    /* BOOK COVER RENDERING */
    .book-cover {
      width: 260px;
      height: 390px;
      border-radius: 4px 10px 10px 4px;
      background: linear-gradient(135deg, #1E3A8A 0%, #0F172A 100%);
      color: #FBF9F4;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 24px 16px;
      box-shadow: 5px 8px 18px rgba(0,0,0,0.18), 1px 3px 6px rgba(0,0,0,0.1);
      position: relative;
      border-left: 6px solid rgba(0,0,0,0.3);
      user-select: none;
    }
    .cover-top h4 {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      color: #D4AF37;
      text-align: center;
      margin-bottom: 5px;
    }
    .cover-title {
      font-family: var(--font-serif);
      font-size: 20px;
      font-weight: 700;
      text-align: center;
      line-height: 1.25;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    }
    .cover-art {
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 15px 0;
      opacity: 0.85;
    }
    .cover-subtitle {
      font-family: var(--font-serif);
      font-size: 10px;
      font-style: italic;
      text-align: center;
      color: #E6E2D8;
    }
    .cover-author {
      font-size: 12px;
      font-weight: 500;
      text-transform: uppercase;
      text-align: center;
      color: #D4AF37;
      letter-spacing: 0.5px;
    }

    /* SIDEBAR ACTIONS (STICKY) */
    .sidebar-actions-sticky {
      position: sticky;
      top: 80px;
      padding-top: 10px;
    }
    .shelf-btn-group {
      display: flex;
      width: 100%;
      margin-bottom: 15px;
    }
    .btn-shelf {
      flex: 1;
      background-color: #1A56DB;
      color: #FFFFFF;
      border-top-left-radius: 10px;
      border-bottom-left-radius: 10px;
      font-weight: 700;
      font-size: 17px;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 4px 14px rgba(26, 86, 219, 0.24), 0 2px 4px rgba(26, 86, 219, 0.12);
    }
    .btn-shelf:hover { 
      background-color: #0F3DAB; 
      transform: translateY(-2px);
      box-shadow: 0 10px 22px rgba(26, 86, 219, 0.38), 0 4px 8px rgba(26, 86, 219, 0.18);
    }
    .btn-shelf:active {
      transform: translateY(0) scale(0.98);
      box-shadow: 0 2px 6px rgba(26, 86, 219, 0.2);
    }
    .btn-shelf.read { background-color: #555555; }
    .btn-shelf-dropdown {
      width: 52px;
      height: 56px;
      background-color: #1A56DB;
      color: #FFFFFF;
      border-left: 1px solid rgba(255,255,255,0.25);
      border-top-right-radius: 10px;
      border-bottom-right-radius: 10px;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 14px rgba(26, 86, 219, 0.24), 0 2px 4px rgba(26, 86, 219, 0.12);
    }
    .btn-shelf-dropdown:hover { 
      background-color: #0F3DAB; 
      transform: translateY(-2px);
      box-shadow: 0 10px 22px rgba(26, 86, 219, 0.38), 0 4px 8px rgba(26, 86, 219, 0.18);
    }
    .btn-shelf-dropdown:active {
      transform: translateY(0) scale(0.98);
      box-shadow: 0 2px 6px rgba(26, 86, 219, 0.2);
    }
    .shelf-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      border: 1px solid var(--gr-border);
      border-radius: 4px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
      display: none;
      z-index: 90;
      list-style: none;
    }
    .shelf-dropdown li {
      padding: 10px 15px;
      font-size: 13px;
      cursor: pointer;
    }
    .shelf-dropdown li:hover { background-color: var(--gr-bg-sec); }
    .shelf-dropdown li.active { font-weight: 600; color: var(--gr-green); }

    /* RATING INTERACTIVE */
    .rate-this-box {
      text-align: center;
      background-color: var(--gr-bg-sec);
      border: 1px solid var(--gr-border);
      border-radius: 4px;
      padding: 15px;
      margin-bottom: 12px;
    }
    .rate-this-box p { font-size: 12px; color: var(--gr-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
    .rating-stars-interactive {
      display: flex;
      justify-content: center;
      gap: 8px;
    }
    .rating-stars-interactive i {
      font-size: 20px;
      color: #D2D2D2;
      transition: color 0.15s, transform 0.1s;
    }
    .rating-stars-interactive i.hover,
    .rating-stars-interactive i.active { color: var(--gr-star); }

    .btn-write-review {
      width: 100%;
      border: 1px solid var(--gr-border);
      border-radius: 4px;
      padding: 10px;
      font-weight: 600;
      font-size: 13px;
      background-color: white;
      color: var(--gr-charcoal);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 12px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    }
    .btn-write-review:hover { background-color: var(--gr-bg-sec); }

    /* SHARE BUTTON CONTROLS */
    .share-container { position: relative; }
    .btn-share {
      width: 100%;
      border: 1px solid var(--gr-border);
      border-radius: 4px;
      padding: 10px;
      font-size: 13px;
      background-color: white;
      color: var(--gr-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    .btn-share:hover { background-color: var(--gr-bg-sec); color: var(--gr-dark); }
    
    /* DOWNLOAD & LISTEN MEDIA BUTTONS */
    .btn-download {
      width: 100%;
      border: 2px solid rgba(225, 29, 72, 0.85);
      border-radius: 10px;
      height: 56px;
      font-weight: 700;
      font-size: 15.5px;
      background-color: #FFFFFF;
      color: #E11D48;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin-bottom: 12px;
      box-shadow: 0 1px 2px rgba(138, 123, 110, 0.04);
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .btn-download:hover {
      background-color: #FFF1F2;
      border-color: #BE123C;
      transform: translateY(-1px);
      color: #BE123C;
      box-shadow: 0 4px 10px rgba(225, 29, 72, 0.1);
    }
    .btn-download:active {
      transform: translateY(0);
      background-color: #FFE4E6;
    }
    .btn-download i {
      font-size: 16px;
      color: #E11D48;
      opacity: 0.9;
    }
    .btn-download:hover i {
      color: #BE123C;
      opacity: 1;
    }

    .btn-listen {
      width: 100%;
      border: 2px solid #22c55e;
      border-radius: 10px;
      height: 56px;
      font-weight: 700;
      font-size: 15.5px;
      background-color: #FFFFFF;
      color: #15803d;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin-bottom: 12px;
      box-shadow: 0 1px 2px rgba(138, 123, 110, 0.04);
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .btn-listen:hover {
      background-color: #F0FDF4;
      border-color: #16a34a;
      transform: translateY(-1px);
      color: #166534;
      box-shadow: 0 4px 12px rgba(34, 197, 94, 0.12);
    }
    .btn-listen:active {
      transform: translateY(0);
      background-color: #DCFCE7;
    }
    .btn-listen i {
      font-size: 16px;
      color: #15803d;
      opacity: 0.9;
    }
    .btn-listen:hover i {
      color: #166534;
      opacity: 1;
    }

    /* AUDIOBOOK WIDGET */
    .audiobook-player-widget {
      position: fixed;
      bottom: 25px;
      right: 25px;
      width: 320px;
      background-color: var(--gr-bg-sec);
      border: 1px solid var(--gr-border);
      border-radius: 12px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.15);
      padding: 18px;
      z-index: 550;
      transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
      display: none;
      flex-direction: column;
      gap: 12px;
    }
    .audiobook-player-widget.active {
      display: flex;
      animation: slideInUp 0.30s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    @keyframes slideInUp {
      from { transform: translateY(100px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    .audio-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--gr-border);
      padding-bottom: 8px;
      margin-bottom: 4px;
    }
    .audio-header h4 {
      font-family: var(--font-serif);
      font-size: 14px;
      font-weight: 700;
      color: var(--gr-dark);
      margin: 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .audio-close-btn {
      color: var(--gr-muted);
      cursor: pointer;
      font-size: 16px;
      transition: color 0.2s;
    }
    .audio-close-btn:hover {
      color: var(--gr-dark);
    }
    .audio-book-details {
      display: flex;
      align-items: center;
      gap: 12px;
      background-color: white;
      padding: 8px;
      border-radius: 6px;
      border: 1px solid var(--gr-border);
    }
    .audio-mini-cover {
      width: 32px;
      height: 48px;
      background-color: var(--gr-green);
      color: white;
      border-radius: 3px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      font-size: 8px;
      padding: 4px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      border-left: 2px solid rgba(255,255,255,0.3);
    }
    .audio-info {
      flex: 1;
      min-width: 0;
    }
    .audio-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--gr-dark);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 2px;
    }
    .audio-author {
      font-size: 10px;
      color: var(--gr-muted);
    }
    .audio-waveform {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      height: 28px;
      margin: 4px 0;
    }
    .wave-bar {
      width: 3px;
      height: 10px;
      background-color: var(--gr-green);
      border-radius: 12px;
      transform-origin: bottom;
      transition: height 0.15s ease;
    }
    .wave-bar.active-animating {
      animation: audioWaveChange 0.7s ease-in-out infinite alternate;
    }
    .wave-bar:nth-child(2n).active-animating { animation-delay: 0.12s; }
    .wave-bar:nth-child(3n).active-animating { animation-delay: 0.25s; }
    .wave-bar:nth-child(4n).active-animating { animation-delay: 0.38s; }
    .wave-bar:nth-child(5n).active-animating { animation-delay: 0.50s; }

    @keyframes audioWaveChange {
      0% { height: 6px; transform: scaleY(0.6); }
      100% { height: 26px; transform: scaleY(1.3); }
    }

    .audio-timeline-container {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .audio-slider-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .audio-timeline {
      flex: 1;
      height: 4px;
      -webkit-appearance: none;
      appearance: none;
      background: var(--gr-border);
      border-radius: 2px;
      outline: none;
      cursor: pointer;
    }
    .audio-timeline::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--gr-green);
      cursor: pointer;
    }
    .audio-time-label {
      font-size: 10px;
      font-family: var(--font-sans), sans-serif;
      color: var(--gr-muted);
      width: 32px;
      text-align: center;
    }
    .audio-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      margin-top: 4px;
    }
    .audio-btn {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background-color: white;
      border: 1px solid var(--gr-border);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 11px;
      color: var(--gr-charcoal);
      transition: all 0.2s;
    }
    .audio-btn:hover {
      background-color: var(--gr-bg-sec);
      border-color: var(--gr-muted);
    }
    .audio-btn.primary {
      width: 40px;
      height: 40px;
      background-color: var(--gr-green);
      color: white;
      font-size: 15px;
      border: none;
    }
    .audio-btn.primary:hover {
      background-color: var(--gr-green-hover);
    }

    @media (max-width: 768px) {
      .audiobook-player-widget {
        width: calc(100% - 32px);
        left: 16px;
        right: 16px;
        bottom: 16px;
      }
    }

    .share-popup {
      position: absolute;
      top: calc(100% + 5px);
      left: 0;
      right: 0;
      background: white;
      border: 1px solid var(--gr-border);
      border-radius: 4px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
      display: none;
      z-index: 95;
      padding: 10px;
    }
    .share-options-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 5px;
      text-align: center;
    }
    .share-item-icon {
      font-size: 16px;
      padding: 8px;
      border-radius: 4px;
      transition: background-color 0.2s;
    }
    .share-item-icon:hover { background-color: var(--gr-bg-sec); color: var(--gr-green); }

    /* COLLECTION / EDITION BADGES */
    .edition-badge-row {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 16px;
      flex-wrap: wrap;
      justify-content: flex-start;
    }
    .free-edition-badge {
      border: 1px solid var(--gr-border);
      padding: 5px 14px;
      font-family: var(--font-serif);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 2px;
      color: var(--gr-dark);
      background-color: #fbfaf6;
      text-transform: uppercase;
      white-space: nowrap;
      border-radius: 2px;
      display: inline-flex;
      align-items: center;
      user-select: none;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }
    .verified-content-badge {
      display: inline-flex;
      align-items: center;
      font-family: var(--font-serif);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1.5px;
      color: #8C1C30;
      text-transform: uppercase;
      white-space: nowrap;
      user-select: none;
    }
    .verified-check-circle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      background-color: #8C1C30;
      border-radius: 50%;
      color: #ffffff;
      font-size: 9px;
      margin-right: 8px;
    }
    @media (max-width: 1023px) {
      .edition-badge-row {
        justify-content: center !important;
      }
    }

    /* BOOK HEADER AREA */
    .book-title {
      font-family: var(--font-serif);
      font-size: 32px;
      font-weight: 700;
      color: var(--gr-dark);
      line-height: 1.25;
      margin-bottom: 4px;
    }
    .book-subtitle {
      font-family: var(--font-serif);
      font-size: 18px;
      color: var(--gr-muted);
      font-style: italic;
      margin-bottom: 12px;
    }
    .author-line {
      font-size: 16px;
      margin-bottom: 15px;
    }
    .author-line a { font-weight: 600; color: var(--gr-link); }
    .author-badge { font-size: 12px; color: var(--gr-muted); }

    .ratings-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 20px;
      font-size: 14px;
      flex-wrap: wrap;
    }
    .stars-display { color: var(--gr-star); font-size: 14px; display: inline-flex; gap: 2px; }
    .average-rating { font-size: 16px; font-weight: 700; color: var(--gr-dark); }
    .rating-muted { color: var(--gr-muted); }
    .bullet-separator { color: #ccc; }

    /* META HORIZONTAL INFO */
    .meta-info-row {
      display: flex;
      align-items: center;
      gap: 15px;
      border-top: 1px solid var(--gr-border);
      border-bottom: 1px solid var(--gr-border);
      padding: 8px 0;
      margin-bottom: 16px;
      font-size: 12px;
      color: var(--gr-muted);
      flex-wrap: wrap;
    }
    .meta-info-item { display: flex; align-items: center; gap: 8px; }
    .meta-info-item i { font-size: 14px; color: var(--gr-green); }
    .meta-info-divider { width: 1px; height: 16px; background-color: var(--gr-border); }

    /* DESCRIPTION */
    .description-container {
      margin-bottom: 16px;
      position: relative;
    }
    .description-text {
      font-size: 15px;
      line-height: 1.6;
      max-height: 72px;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      transition: max-height 0.3s ease;
      position: relative;
    }
    .description-text::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 24px;
      background: linear-gradient(transparent, var(--gr-bg));
      transition: opacity 0.3s;
    }
    .description-container.expanded .description-text {
      display: block;
      -webkit-line-clamp: unset;
      max-height: 800px;
    }
    .description-container.expanded .description-text::after { opacity: 0; pointer-events: none; }
    .description-title {
      font-size: 13px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--gr-muted);
      margin-bottom: 8px;
    }
    .btn-read-more {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 13px;
      font-weight: 600;
      color: var(--gr-green);
      margin-top: 8px;
    }
    .btn-read-more:hover { color: var(--gr-green-hover); }

    /* READING STATUS AND STATS FOR THE BOOK (CURRENTLY READING & WANT TO READ) */
    .reading-stats-row {
      display: flex;
      flex-wrap: wrap;
      margin-top: 16px;
      margin-bottom: 0px;
      padding: 8px 16px;
      align-items: center;
      width: 100%;
      background-color: #ffffff;
      border: 1px solid var(--gr-border);
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(138, 123, 110, 0.04);
      box-sizing: border-box;
    }
    .stats-group {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 1;
      min-width: 170px;
      justify-content: flex-start;
      padding: 4px 0;
    }
    .stats-group:first-child {
      border-right: 1px solid rgba(138, 123, 110, 0.15);
      padding-right: 16px;
    }
    .stats-group:last-child {
      padding-left: 20px;
    }
    .avatar-stack {
      display: flex;
      align-items: center;
    }
    .stats-avatar-item {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: 2px solid #ffffff;
      box-shadow: 0 1px 2px rgba(0,0,0,0.1);
      object-fit: cover;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .stats-avatar-item:not(:first-child) {
      margin-left: -13px;
    }
    .avatar-stack:hover .stats-avatar-item {
      transform: translateY(-2px);
      box-shadow: 0 3px 6px rgba(0,0,0,0.14);
    }
    .reading-stats-text {
      font-family: var(--font-serif), 'Georgia', serif;
      font-size: 14px;
      color: var(--gr-charcoal);
      line-height: 1.3;
    }
    .reading-stats-text strong {
      font-weight: 700;
      color: var(--gr-dark);
    }
    @media (max-width: 567px) {
      .reading-stats-row {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 14px;
      }
      .stats-group:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(138, 123, 110, 0.1);
        padding-right: 0;
        padding-bottom: 8px;
        margin-bottom: 2px;
      }
      .stats-group:last-child {
        padding-left: 0;
        padding-top: 6px;
      }
    }

    /* GENRES */
    .genres-container { margin-bottom: 18px; }
    .genres-title {
      font-size: 13px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--gr-muted);
      margin-bottom: 8px;
    }
    .genres-list { display: flex; flex-wrap: wrap; gap: 8px; }
    .genre-pill {
      background-color: #ffffff;
      border: 1px solid var(--gr-border);
      color: var(--gr-dark);
      font-size: 12px;
      font-weight: 500;
      padding: 6px 14px;
      border-radius: 16px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
      transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    .genre-pill:hover, .genre-pill.active {
      background-color: var(--gr-accent-success);
      color: white;
      border-color: var(--gr-accent-success);
      box-shadow: 0 4px 10px rgba(47, 93, 80, 0.15);
      transform: translateY(-1px);
    }

    /* HISTOGRAM */
    .histogram-section {
      margin-bottom: 18px;
      border-top: 1px solid var(--gr-border);
      padding-top: 15px;
    }
    .histogram-section h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin-bottom: 15px; }
    .histogram-flex { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
    .histogram-grid { flex: 1; min-width: 250px; }
    .histogram-row { display: flex; align-items: center; gap: 12px; font-size: 13px; margin-bottom: 6px; color: var(--gr-muted); }
    .histogram-row .label-star { min-width: 45px; text-align: right; font-weight: 600; color: var(--gr-dark); }
    .histogram-bar-bg { flex: 1; height: 10px; background-color: var(--gr-parchment); border-radius: 6px; overflow: hidden; }
    .histogram-bar-fill { height: 100%; background-color: var(--gr-star); border-radius: 6px; transition: width 0.8s ease; }
    .histogram-pct { min-width: 40px; text-align: right; font-weight: 500; font-family: var(--font-sans); color: var(--gr-charcoal); }
    
    .score-emphasis-box {
      text-align: center;
      min-width: 150px;
      padding: 20px;
      background-color: #ffffff;
      border: 1px solid var(--gr-border);
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(138, 123, 110, 0.05);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    .score-emphasis-box .score-val {
      font-size: 48px;
      font-weight: 800;
      color: var(--gr-dark);
      line-height: 1;
      margin-bottom: 6px;
      font-family: var(--font-sans), 'Inter', sans-serif;
    }
    .score-emphasis-box .stars-display {
      font-size: 16px;
      color: var(--gr-star);
      margin-bottom: 4px;
    }

    /* BOOK DETAILS TABLE */
    .details-section {
      margin-bottom: 18px;
      border: 1px solid var(--gr-border);
      border-radius: 6px;
      padding: 16px 20px;
      background-color: var(--gr-bg-sec);
    }
    .details-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      user-select: none;
    }
    .details-section h3 { font-family: var(--font-serif); font-size: 18px; margin-bottom: 15px; }
    .details-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .details-table td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--gr-border); vertical-align: top; }
    .details-table td.label { font-weight: 600; color: var(--gr-muted); width: 150px; }

    /* COMMUNITY REVIEWS */
    .reviews-section { margin-bottom: 24px; border-top: 1px solid var(--gr-border); padding-top: 15px; }
    .reviews-section h3 { font-family: var(--font-serif); font-size: 22px; margin-bottom: 20px; }
    .review-filters {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      font-size: 13px;
      border-bottom: 1px solid var(--gr-border);
      padding-bottom: 10px;
    }
    .reviews-list { display: flex; flex-direction: column; gap: 20px; }
    .review-card {
      background-color: white;
      border: 1px solid var(--gr-border);
      border-radius: 6px;
      padding: 18px;
      transition: box-shadow 0.2s;
    }
    .review-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
    .review-header { display: flex; justify-content: space-between; align-items: top; margin-bottom: 12px; }
    .reviewer-info { display: flex; gap: 12px; align-items: center; }
    .reviewer-img {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      object-fit: cover;
      background-color: var(--gr-parchment);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 16px;
    }
    .reviewer-name { font-weight: 600; color: var(--gr-dark); font-size: 14px; }
    .reviewer-meta { font-size: 11px; color: var(--gr-muted); }
    .review-stars { color: var(--gr-star); font-size: 11px; margin-top: 3px; }
    .review-body { font-size: 14px; line-height: 1.6; color: var(--gr-charcoal); margin-bottom: 12px; word-break: break-word; }
    .review-footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--gr-muted); border-top: 1px solid #f9f9f9; padding-top: 10px; }
    .btn-helpful {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border-radius: 12px;
      background-color: var(--gr-bg-sec);
      border: 1px solid var(--gr-border);
      color: var(--gr-charcoal);
      font-weight: 500;
      transition: background-color 0.2s, transform 0.1s;
    }
    .btn-helpful:hover { background-color: var(--gr-parchment); }
    .btn-helpful.active { background-color: var(--gr-green); color: white; border-color: var(--gr-green); }

    /* AUTHOR SECTION (AT THE BOTTOM OF RIGHT MAIN CONTENT) */
    .author-section {
      background-color: var(--gr-bg-sec);
      border: 1px solid var(--gr-border);
      border-radius: 6px;
      padding: 18px 20px;
      margin-bottom: 18px;
    }
    .author-section-title { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin-bottom: 18px; color: var(--gr-dark); }
    .author-container { display: flex; gap: 24px; align-items: flex-start; }
    .author-avatar {
      width: 76px;
      height: 76px;
      border-radius: 4px;
      object-fit: cover;
      box-shadow: 0 4px 10px rgba(0,0,0,0.06);
      border: 1px solid var(--gr-border);
      flex-shrink: 0;
    }
    .author-meta-right { flex: 1; }
    .author-name-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }
    .author-name-row h4 { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--gr-dark); }
    .btn-follow-author {
      background-color: transparent;
      border: 1px solid var(--gr-green);
      color: var(--gr-green);
      font-weight: 600;
      font-size: 12px;
      padding: 6px 14px;
      border-radius: 16px;
      transition: background-color 0.2s, color 0.2s;
    }
    .btn-follow-author:hover { background-color: var(--gr-green); color: white; }
    .btn-follow-author.following { background-color: var(--gr-green); color: white; }
    .author-stats { font-size: 12px; color: var(--gr-muted); margin-bottom: 10px; font-weight: 500; }
    .author-bio { font-size: 14px; line-height: 1.6; color: var(--gr-charcoal); }

    /* RELATED BOOKS SECTION */
    .related-books-section { margin-bottom: 18px; }
    .related-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
    .related-section-header h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
    .btn-see-all { font-size: 13px; font-weight: 600; color: var(--gr-green); }

    /* RECOMMENDED ROW & CARDS */
    .related-books-row {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 16px;
    }
    .related-card {
      background: transparent;
      text-align: left;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      height: 100%;
    }
    .related-cover-visual {
      width: 100%;
      aspect-ratio: 1 / 1.55;
      border-radius: 6px;
      margin-bottom: 10px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
      display: block;
      padding: 0;
      overflow: hidden;
      background-color: var(--gr-bg-sec);
      border-left: 3.5px solid rgba(0,0,0,0.22);
      transition: transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    .related-card:hover .related-cover-visual {
      transform: scale(1.06) translateY(-4px);
      box-shadow: 0 10px 20px rgba(138, 123, 110, 0.15), 0 3px 6px rgba(0,0,0,0.08);
    }
    .related-card:hover .related-card-title {
      color: var(--gr-link);
    }
    .related-card-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--gr-dark);
      margin-bottom: 2px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      line-height: 1.3;
    }
    .related-card-author { font-size: 11px; color: var(--gr-muted); margin-bottom: 2px; }
    .related-card-rating { font-size: 11px; color: var(--gr-star); display: flex; align-items: center; gap: 4px; }
    .related-card-rating span { color: var(--gr-muted); }

    /* ALSO AVAILABLE ON BUTTONS */
    .store-circle-btn {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: #ffffff;
      border: 1px solid rgba(138, 123, 110, 0.28);
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.8);
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
      cursor: pointer;
    }
    .store-circle-btn:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 14px rgba(138, 123, 110, 0.15);
    }
    
    .store-circle-btn.amazon:hover {
      border-color: #FF9900;
      background: #FFFBF5;
    }
    .store-circle-btn.amazon svg text {
      transition: fill 0.25s;
    }
    .store-circle-btn.amazon svg path {
      transition: stroke 0.25s;
    }
    .store-circle-btn.amazon:hover svg text {
      fill: #FF9900;
    }
    .store-circle-btn.amazon:hover svg path {
      stroke: #FF9900;
    }

    .store-circle-btn.bluereads:hover {
      border-color: #0088FF;
      background: #F4F8FF;
    }
    .store-circle-btn.bluereads span {
      transition: color 0.25s;
    }
    .store-circle-btn.bluereads:hover span {
      color: #0088FF !important;
    }

    .store-circle-btn.google-books:hover {
      border-color: #4285F4;
      background: #F4F8FF;
    }
    .store-circle-btn.google-books span {
      transition: color 0.25s;
    }
    .store-circle-btn.google-books:hover span {
      color: #4285F4 !important;
    }

    .store-circle-btn.scribd:hover {
      border-color: #1A7B93;
      background: #F2FAFC;
    }
    .store-circle-btn.scribd svg path {
      transition: stroke 0.25s;
    }
    .store-circle-btn.scribd:hover svg path {
      stroke: #1A7B93;
    }

    /* FOOTER */
    footer {
      background-color: var(--gr-parchment);
      border-top: 1px solid var(--gr-border);
      padding: 40px 0;
      color: var(--gr-charcoal);
    }
    .footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 40px; }
    .footer-col h5 { font-size: 13px; text-transform: uppercase; color: var(--gr-dark); font-weight: 700; margin-bottom: 12px; letter-spacing: 0.5px; }
    .footer-col ul { list-style: none; }
    .footer-col ul li { margin-bottom: 8px; font-size: 12px; }
    .footer-col ul li a { color: var(--gr-muted); }
    .footer-col ul li a:hover { color: var(--gr-dark); text-decoration: underline; }
    .footer-bottom {
      border-top: 1px solid var(--gr-border);
      padding-top: 25px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11px;
      color: var(--gr-muted);
      flex-wrap: wrap;
      gap: 15px;
    }
    .footer-links { display: flex; gap: 15px; }
    .social-links { display: flex; gap: 12px; font-size: 16px; }
    .social-links a { color: var(--gr-muted); }
    .social-links a:hover { color: var(--gr-green); }

    /* REVIEW MODAL */
    .modal-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.5);
      z-index: 500;
      display: none;
      align-items: center; justify-content: center;
      padding: 15px;
    }
    .review-modal {
      background: white;
      max-width: 550px;
      width: 100%;
      border-radius: 8px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .modal-header {
      padding: 18px 20px;
      border-bottom: 1px solid var(--gr-border);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .modal-header h4 { font-family: var(--font-serif); font-size: 18px; font-weight: 700; }
    .modal-close { font-size: 20px; color: var(--gr-muted); background: none; }
    .modal-body { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
    .modal-star-row { display: flex; align-items: center; gap: 12px; }
    .modal-star-row span { font-size: 13px; font-weight: 600; color: var(--gr-muted); }
    .modal-stars { display: flex; gap: 6px; }
    .modal-stars i { font-size: 24px; color: #DBDBDB; cursor: pointer; transition: color 0.1s; }
    .modal-stars i.filled { color: var(--gr-star); }
    .modal-input {
      width: 100%;
      height: 120px;
      padding: 12px;
      border: 1px solid var(--gr-border);
      border-radius: 4px;
      font-family: inherit;
      font-size: 14px;
      resize: vertical;
      outline: none;
    }
    .modal-input:focus { border-color: var(--gr-green); }
    .modal-actions {
      padding: 15px 20px;
      border-top: 1px solid var(--gr-border);
      display: flex; justify-content: flex-end; gap: 12px;
    }
    .btn-modal-cancel { padding: 8px 16px; border-radius: 4px; border: 1px solid var(--gr-border); font-size: 13px; font-weight: 600; background: #eee; }
    .btn-modal-submit { padding: 8px 16px; border-radius: 4px; border: none; font-size: 13px; font-weight: 600; background: var(--gr-green); color: white; }
    .btn-modal-submit:hover { background-color: var(--gr-green-hover); }

    /* TOAST MESSAGES */
    .toast-container {
      position: fixed;
      bottom: 25px;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background-color: #333333;
      color: white;
      padding: 12px 24px;
      border-radius: 30px;
      font-size: 13px;
      font-weight: 500;
      z-index: 600;
      box-shadow: 0 5px 15px rgba(0,0,0,0.25);
      transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .toast-container.active { transform: translateX(-50%) translateY(0); }
    .toast-container i { color: var(--gr-green); font-size: 14px; }


    /* RESPONSIVE DESIGN - MEDIA QUERIES */
    @media (min-width: 1024px) and (max-width: 1279px) {
      .book-layout {
        grid-template-columns: 260px 1fr !important;
        column-gap: 24px !important;
        row-gap: 20px !important;
      }
      .left-column-wrapper {
        width: 260px !important;
      }
      .book-cover {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1.5 !important;
      }
    }

    @media (max-width: 1023px) {
      .left-column-wrapper {
        display: contents !important;
      }
      .sidebar-actions-sticky {
        position: static !important;
      }
      .book-layout {
        display: flex !important;
        flex-direction: column !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 15px !important;
        gap: 24px !important;
      }

      /* Explicit DOM element section orders for single-column (tablet portrait & mobile portrait) */
      .grid-cover { order: 1 !important; display: flex !important; justify-content: center !important; width: 100% !important; }
      .grid-header { order: 2 !important; text-align: center !important; width: 100% !important; }
      .grid-sidebar-actions { order: 3 !important; width: 100% !important; max-width: 450px !important; margin: 0 auto !important; }
      .grid-description { order: 4 !important; width: 100% !important; }
      .grid-genres { order: 5 !important; width: 100% !important; }
      .grid-details { order: 6 !important; width: 100% !important; }
      .grid-author { order: 7 !important; width: 100% !important; }
      .grid-related { order: 8 !important; width: 100% !important; }
      .grid-histogram { order: 9 !important; width: 100% !important; }
      .grid-leave-review { order: 10 !important; width: 100% !important; }
      .grid-reviews { order: 11 !important; width: 100% !important; }

      /* Centered typography & content details under single column */
      .book-title {
        text-align: center !important;
        font-size: 26px !important;
        padding: 0 8px !important;
        margin-bottom: 8px !important;
      }
      .author-line {
        text-align: center !important;
        font-size: 15px !important;
        margin-bottom: 12px !important;
      }
      .ratings-row {
        justify-content: center !important;
        gap: 10px !important;
        font-size: 13.5px !important;
        margin-bottom: 16px !important;
      }
      .book-cover {
        width: 220px !important;
        height: 330px !important;
        min-height: 330px !important;
        margin: 0 auto !important;
        border-radius: 4px 10px 10px 4px !important;
        box-shadow: 4px 6px 14px rgba(0,0,0,0.18), 1px 2px 4px rgba(0,0,0,0.1) !important;
      }

      /* Symmetrical meta-info formatting */
      .meta-info-row {
        justify-content: center !important;
        gap: 12px 18px !important;
        padding: 12px 0 !important;
        margin-bottom: 16px !important;
      }
      .meta-info-divider {
        display: none !important;
      }
      .meta-info-item {
        font-size: 12px !important;
      }

      /* Genre formatting */
      .genres-list {
        justify-content: center !important;
        gap: 8px !important;
      }
      .genres-title {
        text-align: center !important;
      }

      /* Multi-button Shelving and interactive triggers */
      .shelf-btn-group {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        gap: 0 !important;
        margin-bottom: 12px !important;
      }
      .btn-shelf {
        flex: 1 !important;
        background-color: #1A56DB !important;
        border-top-left-radius: 10px !important;
        border-bottom-left-radius: 10px !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        height: 56px !important;
        justify-content: center !important;
      }
      .btn-shelf-dropdown {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 48px !important;
        height: 56px !important;
        background-color: #1A56DB !important;
        color: white !important;
        border-left: 1px solid rgba(255,255,255,0.25) !important;
        border-top-right-radius: 10px !important;
        border-bottom-right-radius: 10px !important;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
      }
      .btn-shelf.read {
        background-color: #555555 !important;
      }
      .btn-shelf.read + .btn-shelf-dropdown {
        background-color: #444444 !important;
      }

      /* Symmetrical interaction buttons */
      .rate-this-box {
        padding: 16px !important;
        margin-bottom: 12px !important;
      }
      .rating-stars-interactive i {
        font-size: 24px !important;
        padding: 0 4px !important;
      }
      .btn-write-review, .btn-share, .btn-download, .btn-listen {
        height: 54px !important;
        font-size: 14.5px !important;
        font-weight: 700 !important;
        border-radius: 10px !important;
        margin-bottom: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
      }

      /* Content alignments for readability */
      .description-container {
        margin-bottom: 10px !important;
      }
      .description-text {
        text-align: justify !important;
        text-justify: inter-word !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
        padding: 0 4px !important;
      }

      /* Histogram section */
      .histogram-section {
        padding-top: 12px !important;
        margin-bottom: 10px !important;
      }
      .histogram-flex {
        flex-direction: column-reverse !important;
        gap: 24px !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
      }
      .histogram-grid {
        width: 100% !important;
        max-width: 420px !important;
        margin: 0 auto !important;
      }
      .histogram-row {
        font-size: 11px !important;
        margin-bottom: 6px !important;
      }

      /* Details Table */
      .details-section {
        padding-top: 12px !important;
        margin-bottom: 10px !important;
      }
      .details-table td.label {
        width: 110px !important;
      }

      /* Community Reviews styling */
      .reviews-section {
        padding-top: 12px !important;
        margin-bottom: 10px !important;
      }
      .review-card {
        padding: 14px !important;
      }
      .reviewer-name {
        font-size: 13px !important;
      }
      .review-body {
        font-size: 13.5px !important;
        line-height: 1.5 !important;
      }

      /* Author Section */
      .author-section {
        padding-top: 5px !important;
      }
      .author-container {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 16px !important;
      }
      .author-avatar {
        width: 76px !important;
        height: 76px !important;
        min-width: 76px !important;
        min-height: 76px !important;
        margin: 0 auto !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
      }
      .author-name-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 6px !important;
      }
      .author-name-row h4 {
        font-size: 17px !important;
        text-align: center !important;
      }
      .btn-follow-author {
        margin: 4px auto 0 auto !important;
        width: auto !important;
        min-width: 120px !important;
      }
      .author-stats {
        text-align: center !important;
        margin-bottom: 8px !important;
        font-size: 11.5px !important;
      }
      .author-bio {
        font-size: 13px !important;
        line-height: 1.55 !important;
        text-align: justify !important;
      }

      /* Horizontal related books layout */
      .grid-related {
        overflow: hidden !important;
      }
      .related-books-section {
        margin-bottom: 10px !important;
      }
      .related-books-row {
        display: flex !important;
        overflow-x: auto !important;
        gap: 14px !important;
        scroll-snap-type: x mandatory !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-bottom: 16px !important;
        margin-left: -16px !important;
        margin-right: -16px !important;
        scrollbar-width: none !important;
        grid-template-columns: unset !important;
      }
      .related-card {
        min-width: 115px !important;
        width: 115px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: start !important;
      }
      .related-cover-visual {
        width: 100% !important;
        height: 165px !important;
        padding: 8px !important;
        border-radius: 4px !important;
        box-shadow: 2px 4px 10px rgba(0,0,0,0.14) !important;
      }
      .related-card-title {
        font-size: 11.5px !important;
      }
    }

    @media (max-width: 768px) {
      /* ENFORCE GENERAL CONTAINER SPACING SYMMETRY */
      .container {
        padding: 0 16px !important;
      }

      /* HEADER MOBILE PORTRAIT PERFECT GRID SYMMETRY */
      header {
        height: auto !important;
        padding: 12px 0 !important;
      }
      .header-flex {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
        width: 100% !important;
        justify-content: stretch !important;
      }
      .mobile-header-actions {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        grid-column: 1 !important;
        margin: 0 !important;
      }
      .gr-logo {
        grid-column: 2 !important;
        display: block !important;
        justify-self: center !important;
        text-align: center !important;
        margin: 0 !important;
      }
      .search-container { display: none !important; }
      .nav-links { display: none !important; }
      .nav-profile {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 12px !important;
        grid-column: 3 !important;
        margin: 0 !important;
      }
      .avatar-header {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px !important;
      }
      .mobile-menu-btn, .mobile-search-btn {
        display: block !important;
        font-size: 20px !important;
        color: #0F172A !important;
        padding: 4px !important;
        background: none !important;
        border: none !important;
      }
      .mobile-search-bar-row {
        display: none;
        padding: 8px 16px;
      }

      /* MOBILE SYSTEM FOOTER SYMMETRY */
      footer {
        padding: 30px 0 !important;
      }
      .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 24px !important;
        margin-bottom: 30px !important;
      }
      .footer-col h5 {
        margin-bottom: 10px !important;
      }
      .social-links {
        justify-content: center !important;
        gap: 18px !important;
        margin-bottom: 10px !important;
      }
      .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
        padding-top: 20px !important;
      }
      .footer-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 10px 15px !important;
      }
    }

    /* MOBILE LANDSCAPE SPECIFIC RULES (568px – 767px) */
    @media (min-width: 568px) and (max-width: 767px) {
      .left-column-wrapper {
        display: contents !important;
      }
      .book-layout {
        display: grid !important;
        grid-template-columns: 180px 1fr !important;
        column-gap: 24px !important;
        row-gap: 20px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
      }
      .grid-cover {
        grid-column: 1 !important;
        grid-row: 1 !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        order: unset !important;
      }
      .grid-header {
        grid-column: 2 !important;
        grid-row: 1 !important;
        text-align: left !important;
        width: 100% !important;
        order: unset !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
      }
      .grid-sidebar-actions {
        grid-column: 1 / span 2 !important;
        grid-row: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        order: unset !important;
      }
      .grid-description {
        grid-column: 1 / span 2 !important;
        grid-row: 3 !important;
        width: 100% !important;
        order: unset !important;
      }
      .grid-genres {
        grid-column: 1 / span 2 !important;
        grid-row: 4 !important;
        width: 100% !important;
        order: unset !important;
      }
      .grid-details {
        grid-column: 1 / span 2 !important;
        grid-row: 5 !important;
        width: 100% !important;
        order: unset !important;
      }
      .grid-author {
        grid-column: 1 / span 2 !important;
        grid-row: 6 !important;
        width: 100% !important;
        order: unset !important;
      }
      .grid-related {
        grid-column: 1 / span 2 !important;
        grid-row: 7 !important;
        width: 100% !important;
        order: unset !important;
      }
      .grid-histogram {
        grid-column: 1 / span 2 !important;
        grid-row: 8 !important;
        width: 100% !important;
        order: unset !important;
      }
      .grid-leave-review {
        grid-column: 1 / span 2 !important;
        grid-row: 9 !important;
        width: 100% !important;
        order: unset !important;
      }
      .grid-reviews {
        grid-column: 1 / span 2 !important;
        grid-row: 10 !important;
        width: 100% !important;
        order: unset !important;
      }

      /* Left-aligned content headers and ratings in Mobile Landscape */
      .book-title {
        text-align: left !important;
        padding: 0 !important;
        font-size: 22px !important;
        line-height: 1.25 !important;
        margin-bottom: 6px !important;
      }
      .author-line {
        text-align: left !important;
        font-size: 13.5px !important;
        margin-bottom: 12px !important;
      }
      .ratings-row {
        justify-content: flex-start !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
      }
      .meta-info-row {
        justify-content: flex-start !important;
        gap: 12px 18px !important;
        padding: 10px 0 !important;
        margin-bottom: 14px !important;
      }
      .meta-info-divider {
        display: block !important;
        width: 1px !important;
        height: 14px !important;
        background-color: var(--gr-border) !important;
      }
      .genres-list {
        justify-content: flex-start !important;
        gap: 6px !important;
      }
      .genres-title {
        text-align: left !important;
      }
      .book-cover {
        width: 150px !important;
        height: 225px !important;
        min-height: 225px !important;
        margin: 0 auto !important;
        border-radius: 4px 10px 10px 4px !important;
        box-shadow: 4px 6px 14px rgba(0,0,0,0.18), 1px 2px 4px rgba(0,0,0,0.1) !important;
        aspect-ratio: auto !important;
      }
    }

    /* MOBILE PORTRAIT SPECIFIC RULES (320px – 567px) */
    @media (max-width: 567px) {
      .book-title {
        font-size: 22px !important;
      }
      .book-cover {
        width: 180px !important;
        height: 270px !important;
        min-height: 270px !important;
      }
      .btn-shelf {
        font-size: 15px !important;
        height: 52px !important;
        padding: 10px 12px !important;
      }
      .btn-shelf-dropdown {
        width: 44px !important;
        height: 52px !important;
      }
      .btn-write-review, .btn-share, .btn-download, .btn-listen {
        height: 50px !important;
        font-size: 13.5px !important;
      }
      .rating-stars-interactive i {
        font-size: 22px !important;
      }
      .reading-stats-row {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px 14px !important;
      }
      .stats-group:first-child {
        border-right: none !important;
        border-bottom: 1px solid rgba(138, 123, 110, 0.1) !important;
        padding-right: 0 !important;
        padding-bottom: 8px !important;
        margin-bottom: 2px !important;
      }
      .stats-group:last-child {
        padding-left: 0 !important;
        padding-top: 6px !important;
      }
      .modal-overlay {
        align-items: flex-start !important;
        padding: 10px !important;
        overflow-y: auto !important;
      }
      .review-modal {
        max-height: 95vh !important;
        overflow-y: auto !important;
        margin: 10px auto !important;
      }
      .modal-input {
        height: 75px !important;
      }
      .modal-body {
        padding: 12px 15px !important;
        gap: 10px !important;
      }
    }

    /* Targeted margin alignment overrides */
    main:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(3) > div#descContainer:nth-of-type(1),
    main:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(3),
    main:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(4) > div:nth-of-type(1),
    main:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(5) > div:nth-of-type(1),
    main:nth-of-type(1) > div:nth-of-type(1) > div#author-section:nth-of-type(6) > div:nth-of-type(1),
    main:nth-of-type(1) > div:nth-of-type(1) > div#related-section:nth-of-type(7) > div:nth-of-type(1),
    main:nth-of-type(1) > div:nth-of-type(1) > div#histogram-card:nth-of-type(8) > div:nth-of-type(1),
    main:nth-of-type(1) > div:nth-of-type(1) > div#reviews-section:nth-of-type(9) > div:nth-of-type(1) {
      margin-bottom: 0px !important;
    }

    /* ELEGANT INTEGRATED AD CONTAINERS */
    .ad-outer-container {
      margin: 0px auto;
      padding: 10px;
      border: 0px dashed var(--gr-border);
      border-radius: 0px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      max-width: 100%;
      box-sizing: border-box;
      clear: both;
    }
    .ad-label {
      font-family: var(--font-sans), "Inter", sans-serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 1.5px;
      color: #8c7b6e;
      text-transform: uppercase;
      margin-bottom: 10px;
      opacity: 0.8;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .ad-label::before, .ad-label::after {
      content: "";
      display: inline-block;
      width: 12px;
      height: 1px;
      background-color: var(--gr-border);
    }
    .ad-content-wrapper {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      overflow-x: auto;
      border-radius: 0px;
      padding: 0px;
      box-sizing: border-box;
      border: 0px;
    }
    
    /* Specific size adapters for different layouts */
    .ad-300x250 {
      max-width: 322px;
      margin: 20px auto;
      padding: 12px;
    }
    .ad-300x250 .ad-content-wrapper {
      min-height: 250px;
      width: 300px;
      padding: 0;
    }
    .ad-728x90 {
      max-width: 760px;
      margin: 24px auto;
    }
    .ad-728x90 .ad-content-wrapper {
      min-height: 90px;
      width: 728px;
      padding: 0;
    }
    .ad-320x50 {
      max-width: 342px;
      margin: 18px auto;
    }
    .ad-320x50 .ad-content-wrapper {
      min-height: 50px;
      width: 320px;
      padding: 0;
    }
    .ad-468x60 {
      max-width: 490px;
      margin: 18px auto;
    }
    .ad-468x60 .ad-content-wrapper {
      min-height: 60px;
      width: 468px;
      padding: 0;
    }
    .ad-native {
      max-width: 100%;
      margin: 26px auto;
    }
    .ad-native .ad-content-wrapper {
      padding: 15px;
      background-color: transparent;
      border: none;
    }

    /* RESPONSIVE DISPLAY UTILITIES FOR ADS */
    .show-desktop-only {
      display: flex !important;
    }
    .show-mobile-only {
      display: none !important;
    }

    @media (max-width: 767px) {
      .show-desktop-only {
        display: none !important;
      }
      .show-mobile-only {
        display: flex !important;
      }
    }