    :root {
      /* Refined Warm Alabaster & Terracotta Palette */
      --bg: #f9f8f5;
      --surface: #ffffff;
      --surface-subtle: #f3f1eb;
      --surface-active: #eae7de;
      --text-main: #23201c;
      --text-muted: #6b655b;
      --text-light: #8e877c;

      --accent: #8f3822;
      --accent-soft: #fbf0ec;
      --accent-border: #ebd3ca;

      --short-bg: #fdf2ed;
      --short-text: #8c3620;
      --short-border: #f5d6c8;

      --long-bg: #f2f4f7;
      --long-text: #475569;
      --long-border: #e2e8f0;

      --border: #e7e4dc;
      --border-subtle: #f0eee8;

      --shadow-sm: 0 1px 3px rgba(35, 32, 28, 0.04);
      --shadow-md: 0 8px 24px rgba(35, 32, 28, 0.05);
      --shadow-lg: 0 20px 40px rgba(35, 32, 28, 0.08);

      --radius-sm: 6px;
      --radius-md: 12px;
      --radius-lg: 18px;
      --radius-full: 9999px;
      --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-font-smoothing: antialiased;
    }

    html {
      overflow-y: scroll;
    }

    body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      background: var(--bg);
      color: var(--text-main);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      line-height: 1.5;
    }

    /* Compact Top Nav with Integrated Line Selector */
    nav {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(249, 248, 245, 0.96);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      padding: 0.6rem 1.25rem;
    }

    @media (max-width: 600px) {
      nav {
        padding: 0.5rem 0.65rem;
      }
    }

    .nav-container {
      max-width: 1020px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
    }

    .brand-title {
      font-size: 1.05rem;
      font-weight: 700;
      letter-spacing: -0.01em;
      color: var(--text-main);
      white-space: nowrap;
    }

    /* Line Selector in Header */
    .header-line-picker {
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    .line-pills {
      display: flex;
      gap: 0.25rem;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .line-pills::-webkit-scrollbar {
      display: none;
    }

    .line-btn {
      padding: 0.25rem 0;
      width: 70px;
      text-align: center;
      border-radius: var(--radius-full);
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-muted);
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      white-space: nowrap;
    }

    .line-btn:hover {
      border-color: var(--text-light);
      color: var(--text-main);
    }

    .line-btn.active {
      background: var(--text-main);
      color: var(--bg);
      border-color: var(--text-main);
    }

    @media (max-width: 850px) {
      .line-btn:not(.active) {
        display: none;
      }
    }

    .arrow-btn {
      width: 60px;
      height: 36px;
      border-radius: var(--radius-full);
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-main);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 1rem;
      font-weight: 700;
      transition: var(--transition);
    }

    .arrow-btn:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }

    .arrow-btn:hover {
      background: var(--surface-subtle);
    }

    /* Main Container */
    main {
      max-width: 1020px;
      width: 100%;
      margin: 1.25rem auto;
      padding: 0 1rem;
      flex: 1;
    }

    @media (max-width: 600px) {
      main {
        margin: 0.75rem auto;
        padding: 0 0.5rem;
      }
    }

    /* Unified Canvas Card */
    .canvas-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-md);
      padding: 1.75rem 2rem;
      margin-bottom: 1.5rem;
      transition: var(--transition);
    }

    @media (max-width: 700px) {
      .canvas-panel {
        padding: 0.75rem;
        border-radius: var(--radius-md);
      }
    }

    /* Unified Hero Panel: Greek + Literary + Literal on Left, Video on Right */
    .unified-hero-card {
      background: var(--surface-subtle);
      border-radius: var(--radius-md);
      padding: 1.35rem 1.5rem;
      margin-bottom: 1.5rem;
      border: 1px solid var(--border-subtle);
      border-left: 3px solid var(--accent);
      display: grid;
      grid-template-columns: minmax(0, 1fr) 120px;
      gap: 1.5rem;
      align-items: center;
    }

    @media (max-width: 680px) {
      .unified-hero-card {
        grid-template-columns: minmax(0, 1fr) 75px;
        gap: 0.85rem;
        padding: 0.85rem;
        margin-bottom: 1rem;
      }
    }

    .hero-content-col {
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
    }

    .greek-hero-text {
      font-family: 'Gentium Plus', serif;
      font-size: 2.15rem;
      line-height: 1.3;
      font-weight: 700;
      color: var(--text-main);
      letter-spacing: 0.01em;
      margin-bottom: 0.2rem;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }

    @media (max-width: 700px) {
      .greek-hero-text {
        font-size: 1.15rem;
      }

      .literary-text {
        font-size: 1.05rem !important;
      }

      .literal-text {
        font-size: 0.95rem !important;
      }
    }

    .next-line-btn {
      background: none;
      color: var(--text-muted);
      border: none;
      padding: 0.5rem 0;
      font-size: 0.85rem;
      font-weight: 500;
      cursor: pointer;
      transition: var(--transition);
      display: inline-flex;
      align-items: center;
    }

    .next-line-btn:hover {
      color: var(--accent);
      transform: translateX(2px);
    }

    .translation-item {
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
    }

    .trans-label {
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 700;
      color: var(--accent);
    }

    .literary-text {
      font-family: 'Newsreader', serif;
      font-size: 1.55rem;
      line-height: 1.4;
      font-style: italic;
      color: var(--text-main);
    }

    .literal-text {
      font-size: 1.25rem;
      color: var(--text-main);
      line-height: 1.4;
      font-weight: 500;
    }

    .hero-video-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .player-container {
      width: 100%;
      max-width: 111px;
      aspect-ratio: 9/16;
      max-height: 199px;
      background: #000000;
      border-radius: var(--radius-sm);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      border: 1px solid var(--border);
      position: relative;
    }

    .player-container iframe {
      width: 100%;
      height: 100%;
      border: none;
    }

    .replay-btn {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 0.2rem 0.5rem;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      color: var(--text-main);
      transition: var(--transition);
      display: inline-flex;
      align-items: center;
      gap: 0.2rem;
    }

    .replay-btn:hover {
      background: var(--surface-active);
      border-color: var(--text-light);
    }

    .video-controls {
      display: flex;
      gap: 0.5rem;
      justify-content: center;
      align-items: center;
      margin-top: 0.4rem;
    }

    .video-credit-link {
      font-size: 0.72rem;
      color: var(--text-muted);
      text-decoration: none;
      display: block;
      text-align: center;
      transition: var(--transition);
      font-weight: 500;
    }

    .video-credit-link:hover {
      color: var(--accent);
      text-decoration: underline;
    }

    @media (max-width: 600px) {
      .video-controls {
        gap: 0.25rem;
      }

      .replay-btn {
        padding: 0.15rem 0.3rem;
      }

      .video-credit-link {
        font-size: 0.6rem;
      }
    }

    /* Section Headers */
    .section-header {
      font-size: 0.76rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 700;
      color: var(--text-muted);
      margin-bottom: 0.65rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .hint-click {
      font-size: 0.68rem;
      text-transform: none;
      font-weight: 500;
      color: var(--text-light);
    }

    /* Word-by-Word Interlinear Display */
    .interlinear-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.55rem;
      margin-bottom: 0.75rem;
    }

    .word-tile {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 0.65rem 0.85rem;
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      cursor: pointer;
      position: relative;
      transition: var(--transition);
    }

    @media (max-width: 850px) {
      .word-tile {
        padding: 0.35rem 0.5rem;
      }

      .interlinear-row {
        gap: 0.35rem;
      }

      .wt-greek {
        font-size: 1.05rem;
      }

      .wt-trans {
        font-size: 0.6rem;
      }

      .wt-gloss {
        font-size: 0.75rem;
      }
    }

    .word-tile:hover {
      border-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: var(--shadow-sm);
      background: var(--surface-subtle);
    }

    .wt-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 0.15rem;
    }

    .wt-greek {
      font-family: 'Gentium Plus', serif;
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--accent);
    }

    .wt-trans {
      font-size: 0.72rem;
      color: var(--text-light);
      font-style: italic;
      margin-bottom: 0.35rem;
    }

    .wt-gloss {
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--text-main);
      line-height: 1.35;
    }

    /* Scansion Section */
    .scansion-section {
      /* Padding and border removed as requested */
    }

    .scansion-capsules {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-start;
      gap: 0.35rem 0.65rem;
      padding-bottom: 1.25rem;
      max-width: max-content;
      margin: 0 auto;
    }

    .scansion-foot {
      display: flex;
      flex-wrap: nowrap;
      gap: 0.25rem;
    }

    .scansion-pill {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      padding: 0.35rem 0.5rem;
      border-radius: var(--radius-sm);
      min-width: 44px;
      text-align: center;
      border: 1px solid transparent;
    }

    .scansion-pill.long {
      background: var(--long-bg);
      color: var(--long-text);
      border-color: var(--long-border);
    }

    .scansion-pill.short {
      background: var(--short-bg);
      color: var(--short-text);
      border-color: var(--short-border);
    }

    .sp-sym {
      font-size: 0.95rem;
      font-weight: 900;
      line-height: 1;
    }

    .sp-grk {
      font-family: 'Gentium Plus', serif;
      font-size: 1.05rem;
      font-weight: 700;
      margin: 0.12rem 0;
    }

    .sp-ipa {
      font-family: monospace;
      font-size: 0.6rem;
      font-weight: 600;
      opacity: 0.9;
    }

    .sp-trans {
      font-size: 0.6rem;
      opacity: 0.8;
    }

    .scansion-half {
      display: flex;
      flex-wrap: nowrap;
      justify-content: center;
      gap: 0.65rem;
    }

    /* Word Modal */
    .modal-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      padding: 1rem;
    }

    .modal-backdrop.open {
      display: flex;
    }

    .modal-container {
      background: var(--surface);
      border-radius: var(--radius-lg);
      max-width: 480px;
      width: 100%;
      max-height: 95vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: var(--shadow-lg);
      border: 1px solid var(--border);
    }

    .modal-bar {
      padding: 0.75rem 1.15rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--border);
      font-size: 0.88rem;
      font-weight: 700;
    }

    .modal-close {
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-size: 1.25rem;
      cursor: pointer;
    }

    .word-popup-body {
      padding: 1.25rem 1.35rem;
      line-height: 1.5;
      overflow-y: auto;
    }

    .wp-header-area {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--border);
      padding-bottom: 0.65rem;
      margin-bottom: 0.85rem;
    }

    .nav-arrow {
      background: none;
      border: none;
      font-size: 1.25rem;
      color: var(--text-muted);
      cursor: pointer;
      padding: 0.5rem;
      transition: var(--transition);
    }

    .nav-arrow:hover:not(:disabled) {
      color: var(--accent);
      transform: scale(1.1);
    }

    .nav-arrow:disabled {
      opacity: 0.2;
      cursor: not-allowed;
    }

    .wp-greek {
      font-family: 'Gentium Plus', serif;
      font-size: 1.85rem;
      font-weight: 700;
      color: var(--accent);
    }

    .wp-ipa {
      font-family: monospace;
      font-size: 0.88rem;
      color: var(--text-muted);
    }

    .wp-field {
      margin-bottom: 0.75rem;
    }

    .wp-field-label {
      font-size: 0.68rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 700;
      color: var(--accent);
      margin-bottom: 0.2rem;
    }

    .wp-field-value {
      font-size: 0.88rem;
      color: var(--text-main);
    }

    .wp-field-value.root-text {
      font-style: italic;
      color: #000000;
    }

    /* Credits Modal */
    .credits-container {
      max-width: 620px;
      max-height: 95vh;
      display: flex;
      flex-direction: column;
    }

    .credits-scroll {
      padding: 1.25rem;
      overflow-y: auto;
      font-size: 0.82rem;
      color: #000000;
      line-height: 1.55;
    }

    .credits-scroll h4 {
      color: var(--text-main);
      font-size: 0.88rem;
      font-weight: 700;
      margin-bottom: 0.35rem;
    }

    .credits-scroll ul {
      padding-left: 1.2rem;
      margin-bottom: 1rem;
    }

    .credits-scroll li {
      margin-bottom: 0.35rem;
    }

    .credits-scroll a {
      color: var(--accent);
      text-decoration: none;
      font-weight: 600;
    }

    .credits-scroll a:hover {
      text-decoration: underline;
    }

    /* Hamburger Menu */
    .menu-container {
      position: relative;
      display: inline-block;
      margin-left: 0.5rem;
    }

    .hamburger-btn {
      background: none;
      border: none;
      font-size: 1.25rem;
      cursor: pointer;
      color: var(--text-main);
      padding: 0.2rem 0.5rem;
      border-radius: var(--radius-sm);
      transition: var(--transition);
    }

    .hamburger-btn:hover {
      background-color: var(--surface-subtle);
    }

    .dropdown-menu {
      display: none;
      position: absolute;
      right: 0;
      top: 100%;
      background-color: var(--surface);
      min-width: 180px;
      box-shadow: var(--shadow-md);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      z-index: 101;
      padding: 0.5rem 0;
    }

    .dropdown-menu.show {
      display: block;
    }

    .dropdown-menu a {
      color: var(--text-main);
      padding: 10px 16px;
      text-decoration: none;
      display: block;
      font-size: 0.85rem;
      font-weight: 500;
      transition: var(--transition);
    }

    .dropdown-menu a:hover {
      background-color: var(--surface-subtle);
      color: var(--accent);
    }

    .full-lines-scansion-capsules {
      position: relative;
      padding-left: 0;
      max-width: none;
      margin: 0;
    }

    .full-lines-num {
      font-weight: 500;
      color: var(--text-muted);
      font-size: 0.65rem;
      user-select: none;
      margin-bottom: 0.4rem;
      opacity: 0.8;
    }

    @media (max-width: 600px) {
      #fullLinesModal.modal-backdrop {
        padding: 0.25rem;
      }
      
      #fullLinesModal .modal-container {
        width: 100% !important;
        max-width: 100% !important;
      }

      .full-lines-scansion-capsules {
        padding-left: 0;
      }

      .full-lines-num {
        display: none;
      }
    }

    @media (max-width: 600px) {
      .scansion-pill {
        padding: 0.175rem 0.25rem;
        min-width: 32px;
      }
    }
