:root {
    --red-flesh: #E54D42;
    --red-deep: #B83228;
    --green-rind: #2E5A3B;
    --green-light: #D1E8D5;
    --black-seed: #1A1A1A;
    --bg-cream: #F9F7F2;
    --white: #FFFFFF;
    --text-main: #333333;
    --text-light: #666666;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 12px;
    --transition: all 0.3s ease;
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }

  /* Header */
  header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 2px solid var(--green-light);
  }

  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--green-rind);
  }

  .brand img {
    height: 32px;
    width: auto;
    border-radius: 6px;
  }

  .nav-links {
    display: none;
    gap: 24px;
  }

  .nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
  }

  .nav-links a:hover {
    color: var(--red-flesh);
  }

  .btn-download {
    background-color: var(--red-flesh);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(229, 77, 66, 0.3);
  }

  .btn-download:hover {
    background-color: var(--red-deep);
    transform: translateY(-2px);
  }

  .btn-download svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  /* Hero Section */
  .hero {
    padding: 40px 0 60px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--bg-cream) 100%);
  }

  .hero-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .hero-text {
    max-width: 500px;
    z-index: 2;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 1.3;
    color: var(--black-seed);
    margin-bottom: 16px;
    font-weight: 800;
  }

  .hero h1 span {
    color: var(--red-flesh);
    position: relative;
    display: inline-block;
  }

  .hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--green-light);
    z-index: -1;
    border-radius: 4px;
  }

  .hero p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 32px;
  }

  .hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  .hero-actions .btn-download {
    font-size: 18px;
    padding: 14px 32px;
  }

  .hero-tags {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
  }

  .tag {
    background: var(--white);
    border: 1px solid var(--green-light);
    color: var(--green-rind);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .tag::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--red-flesh);
  }

  /* Cover Wall */
  .cover-wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    height: 500px;
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  }

  .cover-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: scrollDown 25s linear infinite;
  }

  .cover-col:nth-child(2) {
    animation: scrollUp 25s linear infinite;
  }

  .cover-col:nth-child(3) {
    animation: scrollDown 28s linear infinite;
  }

  .cover-card {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    background-color: #eee;
  }

  .cover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  @keyframes scrollDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
  }

  @keyframes scrollUp {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
  }

  /* Section Basic */
  section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--black-seed);
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .section-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background-color: var(--red-flesh);
    border-radius: 3px;
  }

  .section-subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 40px;
  }

  /* Melon Categories */
  .category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .category-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
  }

  .category-card:hover {
    border-color: var(--red-flesh);
    transform: translateY(-4px);
  }

  .category-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-cream);
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
  }

  .category-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
  }

  .category-desc {
    font-size: 13px;
    color: var(--text-light);
  }

  /* Knocking Melon (Hot List) */
  .hot-melon-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .melon-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    align-items: stretch;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
  }

  .melon-item:hover .melon-cover {
    transform: scale(1.05);
  }

  .melon-cover {
    width: 120px;
    flex-shrink: 0;
    transition: transform 0.5s ease;
    overflow: hidden;
  }

  .melon-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .melon-info {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .melon-rank {
    font-size: 12px;
    font-weight: bold;
    color: var(--red-flesh);
    margin-bottom: 4px;
  }

  .melon-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .melon-hook {
    font-size: 14px;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .melon-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }

  .melon-tag {
    font-size: 11px;
    padding: 2px 8px;
    background-color: var(--green-light);
    color: var(--green-rind);
    border-radius: 4px;
  }

  /* Sliced Melon (Completed) */
  .slice-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .slice-container::-webkit-scrollbar {
    height: 6px;
  }
  .slice-container::-webkit-scrollbar-thumb {
    background: var(--red-flesh);
    border-radius: 3px;
  }

  .slice-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: 12px 12px 12px 40px; /* Slice shape hint */
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
  }

  .slice-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
  }

  .slice-info {
    padding: 12px;
  }

  .slice-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .slice-status {
    font-size: 12px;
    color: var(--red-flesh);
    margin-top: 4px;
    font-weight: 500;
  }

  /* Icebox (Offline) */
  .icebox-section {
    background: #F0F5F2; /* Slight green tint */
    border-radius: 24px;
    padding: 40px 20px;
    margin: 0 20px;
  }

  .icebox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    background: #E2EBE5;
    padding: 16px;
    border-radius: 16px;
    border: 4px solid #D1E0D5;
  }

  .ice-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    text-align: center;
  }

  .ice-item img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
  }

  .ice-item p {
    font-size: 12px;
    padding: 8px 4px;
    font-weight: 500;
  }

  /* Vine (Related) */
  .vine-layout {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
  }

  .vine-node {
    flex: 0 0 140px;
    position: relative;
  }

  .vine-node:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 20px;
    height: 4px;
    background: var(--green-rind);
    border-radius: 2px;
  }

  .vine-node img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--green-rind);
  }
  
  .vine-node p {
    text-align: center;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 600;
  }

  /* Ripeness Table */
  .table-wrap {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
  }

  th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
  }

  th {
    background-color: var(--green-light);
    color: var(--green-rind);
    font-weight: 600;
  }

  td {
    font-size: 15px;
  }

  .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--red-flesh);
    margin-right: 6px;
  }

  /* Reason Cards */
  .reason-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .reason-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--red-flesh);
  }

  .reason-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .reason-card p {
    font-size: 14px;
    color: var(--text-light);
  }

  /* Download Section */
  .download-section {
    background: var(--red-flesh);
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
    border-radius: 32px 32px 0 0;
    margin-top: 40px;
  }

  .download-section h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--white);
  }
  .download-section h2::before {
    display: none;
  }

  .download-section p {
    font-size: 16px;
    margin-bottom: 32px;
    opacity: 0.9;
  }

  .btn-large-white {
    background: var(--white);
    color: var(--red-flesh);
    font-size: 20px;
    padding: 16px 48px;
    border-radius: 30px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  }

  .btn-large-white:hover {
    transform: scale(1.05);
  }

  /* Footer */
  footer {
    background: var(--black-seed);
    color: #888;
    padding: 40px 20px;
    text-align: center;
    font-size: 13px;
  }

  .footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
  }

  .footer-links a {
    color: #ccc;
  }

  .footer-links a:hover {
    color: var(--white);
  }

  .footer-info {
    line-height: 2;
  }

  /* Responsive */
  @media (min-width: 768px) {
    .hero {
      padding: 60px 0 80px;
    }
    .hero h1 {
      font-size: 48px;
    }
    .hero-layout {
      flex-direction: row;
      align-items: center;
    }
    .hero-text {
      flex: 1;
    }
    .cover-wall {
      flex: 1;
      grid-template-columns: repeat(3, 1fr);
      height: 600px;
      mask-image: none; /* Remove mask on desktop for full view */
      -webkit-mask-image: none;
    }
    .nav-links {
      display: flex;
    }
    .category-grid {
      grid-template-columns: repeat(4, 1fr);
    }
    .hot-melon-wrapper {
      grid-template-columns: repeat(2, 1fr);
    }
    .icebox-grid {
      grid-template-columns: repeat(4, 1fr);
    }
    .reason-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    .download-section {
      padding: 100px 20px;
    }
  }

  @media (min-width: 1024px) {
    .hero h1 {
      font-size: 56px;
    }
    .cover-wall {
      grid-template-columns: repeat(4, 1fr);
      gap: 20px;
      height: 700px; /* taller for 1024 to fit 12+ */
    }
    .hot-melon-wrapper {
      grid-template-columns: repeat(3, 1fr);
    }
    .melon-item {
      flex-direction: column;
    }
    .melon-cover {
      width: 100%;
      aspect-ratio: 3/4;
    }
    .melon-info {
      padding: 20px;
    }
    .category-grid {
      grid-template-columns: repeat(6, 1fr);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .cover-col {
      animation: none;
    }
    * {
      transition: none !important;
    }
  }