    :root {
      --red: #b80d12;
      --red-dark: #98090d;
      --navy: #0c1830;
      --bg: #f7f7f7;
      --soft: #efefef;
      --text: #111111;
      --muted: #6b7280;
      --line: #e5e7eb;
      --shadow: 0 10px 28px rgba(0,0,0,.08);
      --radius: 18px;
    }

    * { box-sizing: border-box; }
    html, body { margin: 0; padding: 0; }
    body {
      font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
      color: var(--text);
      background: #fff;
    }

    img { max-width: 100%; display: block; }
    a { color: inherit; text-decoration: none; }
    button { font-family: inherit; }

    .container {
      width: min(1500px, calc(100% - 28px));
      margin: 0 auto;
    }

    main { background: #fff; }
    .main-section {
      padding: 18px 0 8px;
    }
    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1.85fr) minmax(320px, .8fr);
      gap: 20px;
      align-items: start;
    }

    .section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 8px 0 16px;
      gap: 12px;
    }
    .section-head h2 {
      margin: 0;
      font-size: 22px;
      font-weight: 800;
      position: relative;
      padding-bottom: 10px;
    }
    .section-head h2::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0;
      width: 22px;
      height: 3px;
      background: var(--red);
      border-radius: 999px;
    }
    .light-link {
      border: 1px solid #ececec;
      padding: 10px 14px;
      border-radius: 12px;
      background: #fff;
      color: #333;
      font-size: 13px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      white-space: nowrap;
    }

    .viewer-card {
      background: #fff;
      border-radius: 14px;
      box-shadow: var(--shadow);
      border: 1px solid #ededed;
      overflow: hidden;
    }
    .viewer-shell {
      display: grid;
      grid-template-columns: 104px minmax(0, 1fr);
      min-height: 620px;
      background: #fff;
    }
    .viewer-tools {
      border-right: 1px solid #efefef;
      background: #fafafa;
      padding: 10px 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 3px;
    }
    .tool-btn {
      padding: 13px 10px;
      display: flex;
      align-items: center;
      gap: 10px;
      border: 0;
      background: transparent;
      color: #333;
      font-size: 13px;
      cursor: pointer;
      text-align: left;
      border-radius: 0;
    }
    .tool-btn:hover, .tool-btn.active {
      background: #fff;
      color: var(--red);
    }
    .tool-btn .ico {
      width: 24px;
      text-align: center;
      font-size: 17px;
    }
    .viewer-main {
      background: #fff;
      padding: 16px 16px 0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    .paper-stage {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      overflow: auto;
      padding-bottom: 10px;
    }
    .paper-frame {
      width: min(100%, 980px);
      transform-origin: top center;
      transition: transform .18s ease;
    }
    .paper-frame.zoomed {
      transform: scale(1.08);
    }
    .paper-scan {
      border: 1px solid #ddd;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 4px 14px rgba(0,0,0,.08);
      background: #fff;
    }
    .paper-scan img {
      width: 100%;
      height: auto;
      display: block;
    }

    .page-bar {
      background: #232c3a;
      color: #fff;
      padding: 12px 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      flex-wrap: wrap;
    }
    .page-btn {
      border: 0;
      background: transparent;
      color: #fff;
      width: 32px;
      height: 32px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
    }
    .page-btn:hover { background: rgba(255,255,255,.08); }
    .page-num {
      width: 66px;
      height: 28px;
      border: 0;
      border-radius: 6px;
      text-align: center;
      outline: none;
      font-weight: 700;
      font-size: 15px;
    }
    .page-total { opacity: .85; }
    .grid-icon {
      margin-left: auto;
      margin-right: 8px;
      width: 34px;
      height: 34px;
      border-radius: 8px;
      border: 0;
      background: rgba(255,255,255,.08);
      color: #fff;
      cursor: pointer;
    }

    .page-thumbs {
      padding: 14px 0 0;
    }
    .page-thumbs-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: 0 0 12px;
    }
    .page-thumbs-head h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 800;
    }
    .page-thumbs-head span {
      color: #6b7280;
      font-size: 13px;
    }
    .thumb-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }
    .page-thumb {
      border: 1px solid #ececec;
      border-radius: 12px;
      overflow: hidden;
      background: #fff;
      cursor: pointer;
      transition: .2s ease;
      box-shadow: 0 4px 10px rgba(0,0,0,.04);
    }
    .page-thumb:hover {
      transform: translateY(-2px);
    }
    .page-thumb.active {
      border-color: var(--red);
      box-shadow: 0 0 0 2px rgba(184,13,18,.08);
    }
    .page-thumb img {
      width: 100%;
      height: 120px;
      object-fit: cover;
      display: block;
      background: #f7f7f7;
    }
    .page-thumb .cap {
      padding: 8px 10px 10px;
      font-size: 12px;
      color: #222;
      display: flex;
      justify-content: space-between;
      gap: 8px;
    }
    .page-thumb .cap b {
      color: var(--red);
    }

    .sidebar-stack {
      display: grid;
      gap: 14px;
    }
    .panel {
      background: #fff;
      border: 1px solid #ededed;
      border-radius: 14px;
      box-shadow: var(--shadow);
      padding: 16px;
    }
    .panel h3 {
      margin: 0 0 14px;
      font-size: 22px;
      font-weight: 800;
      line-height: 1.1;
    }

    .calendar {
      border: 1px solid #eee;
      border-radius: 12px;
      overflow: hidden;
      background: #fff;
    }
    .calendar-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 12px 6px;
      font-weight: 700;
      font-size: 18px;
    }
    .calendar-head button {
      border: 0;
      background: transparent;
      font-size: 18px;
      cursor: pointer;
      color: #333;
      width: 28px;
      height: 28px;
      border-radius: 50%;
    }
    .calendar-head button:hover { background: #f4f4f4; }
    .weekday, .days {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
    }
    .weekday div {
      text-align: center;
      padding: 8px 0 10px;
      color: #666;
      font-size: 12px;
      font-weight: 600;
    }
    .day {
      aspect-ratio: 1 / 1;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: #333;
      border-radius: 10px;
      margin: 2px;
    }
    .day.muted { color: #c0c0c0; }
    .day.selected {
      background: var(--red);
      color: #fff;
      font-weight: 700;
    }
    .days { padding: 0 8px 8px; }

    .date-btn {
      margin-top: 14px;
      width: 100%;
      height: 48px;
      border-radius: 10px;
      border: 1px solid rgba(184,13,18,.35);
      background: #fff;
      color: var(--red);
      font-weight: 700;
      font-size: 15px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .recent-list {
      margin-top: 4px;
      border: 1px solid #ededed;
      border-radius: 12px;
      overflow: hidden;
      background: #fff;
    }
    .recent-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 15px 14px;
      border-top: 1px solid #f2f2f2;
      font-size: 14px;
      cursor: pointer;
    }
    .recent-item:first-child { border-top: 0; }
    .recent-item:hover { background: #fafafa; }
    .recent-item .left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .recent-item .ico {
      color: var(--red);
      font-size: 15px;
      flex: 0 0 auto;
    }
    .recent-item .label {
      font-weight: 500;
      color: #222;
    }
    .recent-item .arrow {
      color: #777;
      flex: 0 0 auto;
    }

    .edition-section {
      padding: 18px 0 8px;
    }
    .edition-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }
    .edition-head h2 {
      margin: 0;
      font-size: 22px;
      font-weight: 800;
      position: relative;
      padding-bottom: 10px;
    }
    .edition-head h2::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0;
      width: 22px;
      height: 3px;
      border-radius: 999px;
      background: var(--red);
    }

    .edition-grid {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 12px;
    }
    .edition-card {
      background: #fff;
      border: 1px solid #ececec;
      border-radius: 14px;
      box-shadow: 0 4px 12px rgba(0,0,0,.04);
      overflow: hidden;
    }
    .edition-card .head {
      padding: 12px 10px 10px;
      text-align: center;
      font-size: 14px;
      font-weight: 700;
      color: #222;
      min-height: 56px;
    }
    .edition-card .paper-thumb {
      padding: 0 10px 10px;
    }
    .edition-card .paper-thumb img {
      width: 100%;
      height: 125px;
      object-fit: cover;
      border-radius: 8px;
      border: 1px solid #eee;
      background: #f7f7f7;
    }
    .edition-card .date {
      text-align: center;
      color: #555;
      font-size: 13px;
      padding: 2px 10px 12px;
    }
    .edition-card .btn-row {
      padding: 0 10px 12px;
      display: flex;
      justify-content: center;
      gap: 8px;
    }
    .outline-btn {
      border: 1px solid rgba(184,13,18,.35);
      background: #fff;
      color: var(--red);
      border-radius: 10px;
      height: 38px;
      padding: 0 18px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .icon-square {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      border: 1px solid rgba(184,13,18,.35);
      background: #fff;
      color: var(--red);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .feature-strip {
      margin-top: 18px;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 8px 20px rgba(0,0,0,.05);
      border: 1px solid #ededed;
    }
    .feature-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      background: #fff;
    }
    .feature {
      padding: 18px 16px;
      display: flex;
      gap: 12px;
      align-items: flex-start;
      border-right: 1px solid #ececec;
      min-height: 100px;
    }
    .feature:last-child { border-right: 0; }
    .feature .ico {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      border: 2px solid var(--red);
      color: var(--red);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      flex: 0 0 auto;
    }
    .feature h4 {
      margin: 0;
      font-size: 16px;
      font-weight: 800;
    }
    .feature p {
      margin: 6px 0 0;
      font-size: 12px;
      color: #666;
      line-height: 1.5;
    }

    .cta-banner {
      margin-top: 16px;
      background: linear-gradient(90deg, #0d1831, #09142a);
      color: #fff;
      border-radius: 14px;
      padding: 18px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }
    .cta-banner .left {
      display: flex;
      align-items: center;
      gap: 16px;
      min-width: 0;
    }
    .cta-banner .left .icon {
      width: 44px;
      height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #fbbf24;
      font-size: 26px;
      flex: 0 0 auto;
    }
    .cta-banner h3 {
      margin: 0;
      font-size: 20px;
      font-weight: 800;
    }
    .cta-list {
      margin-top: 8px;
      color: rgba(255,255,255,.82);
      font-size: 13px;
      display: flex;
      gap: 22px;
      flex-wrap: wrap;
    }
    .cta-btn {
      border: 0;
      background: var(--red);
      color: #fff;
      border-radius: 12px;
      height: 46px;
      padding: 0 18px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      min-width: 120px;
    }

   
    @media (max-width: 1320px) {
      .top-header .row { grid-template-columns: 1fr; }
      .date-area, .meta-right, .actions { justify-content: flex-start; }
      .layout { grid-template-columns: 1fr; }
      .thumb-grid { grid-template-columns: repeat(3, 1fr); }
      .edition-grid { grid-template-columns: repeat(3, 1fr); }
      .feature-grid { grid-template-columns: repeat(2, 1fr); }
      .footer-top { grid-template-columns: 1fr 1fr; }
    }

    @media (max-width: 820px) {
      .brand { align-items: flex-start; flex-direction: column; }
      .brand .logo { min-width: 0; }
      .brand .logo .small { margin-left: 0; }
      .brand .divider { display: none; }
      .viewer-shell { grid-template-columns: 1fr; }
      .viewer-tools { border-right: 0; border-bottom: 1px solid #efefef; flex-direction: row; overflow-x: auto; }
      .tool-btn { white-space: nowrap; }
      .paper-frame.zoomed { transform: scale(1); }
      .thumb-grid { grid-template-columns: repeat(2, 1fr); }
      .edition-grid { grid-template-columns: repeat(2, 1fr); }
      .feature-grid { grid-template-columns: 1fr; }
      .feature { border-right: 0; border-bottom: 1px solid #ececec; }
      .feature:last-child { border-bottom: 0; }
      .footer-top { grid-template-columns: 1fr; }
      .cta-banner { flex-direction: column; align-items: flex-start; }
      .cta-btn { width: 100%; }
    }

    @media (max-width: 540px) {
      .container { width: min(100% - 14px, 100%); }
      .brand .logo .title { font-size: 30px; }
      .brand .paper-name .title { font-size: 24px; }
      .pill { height: 40px; padding: 0 12px; font-size: 12px; }
      .nav-item { padding: 12px 14px; font-size: 13px; }
      .viewer-main { padding: 10px 10px 0; }
      .page-bar { gap: 10px; }
      .page-num { width: 54px; }
      .edition-grid { grid-template-columns: 1fr; }
      .thumb-grid { grid-template-columns: 1fr; }
      .section-head h2, .edition-head h2, .panel h3 { font-size: 20px; }
      .light-link { width: 100%; justify-content: center; }
      .section-head, .edition-head, .page-thumbs-head { align-items: flex-start; flex-direction: column; }
    }