* {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      background: linear-gradient(145deg, #f4f7fc 0%, #eef2f5 100%);
      padding: 16px 12px;
      min-height: 100vh;
    }

    .dashboard {
      max-width: 900px;
      margin: 0 auto;
      width: 100%;
    }

    .calendar-card {
      background-color: rgba(255, 255, 255, 0.96);
      border-radius: 1.5rem;
      padding: 1rem;
      box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.05);
      transition: all 0.2s ease;
    }

    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.25rem;
      flex-wrap: wrap;
      gap: 8px;
    }

    .header h2 {
      font-size: clamp(1rem, 5vw, 1.5rem);
      font-weight: 700;
      background: linear-gradient(135deg, #1f2b3c, #2c3e50);
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
      letter-spacing: -0.2px;
      text-align: center;
    }

    .header button {
      background: #2c3e50;
      border: none;
      color: white;
      font-size: clamp(0.9rem, 4vw, 1.2rem);
      font-weight: 600;
      padding: 8px 16px;
      border-radius: 40px;
      cursor: pointer;
      transition: 0.2s;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
      min-width: 44px;
      min-height: 44px;
    }

    .header button:active {
      transform: scale(0.96);
    }

    .calendar-days {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      text-align: center;
      font-weight: 600;
      color: #2c3e50;
      margin-bottom: 10px;
      font-size: clamp(0.7rem, 3vw, 0.85rem);
      text-transform: uppercase;
      letter-spacing: 0.3px;
      gap: 4px;
    }

    .calendar-dates {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 6px;
    }

    .day-cell {
      background: #f8fafd;
      border-radius: 14px;
      padding: 8px 4px 6px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      transition: all 0.2s;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
      border: 1px solid #e2edf2;
      min-height: 65px;
    }

    .day-label {
      font-weight: 600;
      font-size: clamp(0.8rem, 3.5vw, 1rem);
      color: #1e2f3d;
    }

    input[type="checkbox"] {
      width: clamp(18px, 5vw, 22px);
      height: clamp(18px, 5vw, 22px);
      cursor: pointer;
      accent-color: #2c7da0;
      transition: 0.1s;
      min-width: 18px;
    }

    input[type="checkbox"]:disabled {
      accent-color: #b0c4ce;
      cursor: not-allowed;
      opacity: 0.7;
    }

    .today {
      background: #ffe8c7 !important;
      border: 2px solid #f4b942;
      box-shadow: 0 4px 8px rgba(244, 185, 66, 0.2);
    }

    .past-day {
      background: #eef3f7;
      opacity: 0.85;
    }

    .future-day {
      background: #ffffff;
    }

    .empty {
      background: transparent;
      box-shadow: none;
      border: none;
      min-height: auto;
    }

    .streak-levels-panel {
      margin-top: 20px;
      background: linear-gradient(115deg, #ffffff 0%, #fefefe 100%);
      border-radius: 1.5rem;
      padding: 1rem;
      box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.15);
      border: 1px solid rgba(44, 62, 80, 0.12);
      transition: all 0.2s;
    }

    .streak-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      margin-bottom: 16px;
      border-bottom: 2px dashed #cbdde6;
      padding-bottom: 12px;
      gap: 12px;
    }

    .streak-header h3 {
      font-size: clamp(1.1rem, 5vw, 1.45rem);
      font-weight: 700;
      background: linear-gradient(120deg, #1f4870, #2c7da0);
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
      letter-spacing: -0.3px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .current-streak-badge {
      background: #1f2b3c;
      color: white;
      padding: 6px 14px;
      border-radius: 60px;
      font-weight: 600;
      font-size: clamp(0.8rem, 3.5vw, 0.9rem);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 6px rgba(0,0,0,0.1);
      white-space: nowrap;
    }

    .level-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f9fcff;
      margin: 10px 0;
      padding: 12px 14px;
      border-radius: 60px;
      transition: all 0.2s ease;
      border: 1px solid #dfecf2;
      gap: 12px;
    }

    .level-info {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      flex: 1;
    }

    .level-icon {
      font-size: clamp(1.4rem, 5vw, 2rem);
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
      width: 40px;
      text-align: center;
      flex-shrink: 0;
    }

    .level-name {
      font-weight: 800;
      font-size: clamp(0.9rem, 4vw, 1.2rem);
      letter-spacing: -0.2px;
      color: #1e2f3d;
      flex-shrink: 0;
    }

    .streak-requirement {
      font-size: clamp(0.7rem, 3vw, 0.8rem);
      background: #eef2f7;
      padding: 4px 10px;
      border-radius: 40px;
      color: #2c5a74;
      font-weight: 500;
      white-space: nowrap;
    }

    .level-status {
      font-weight: 700;
      padding: 5px 12px;
      border-radius: 40px;
      font-size: clamp(0.7rem, 3vw, 0.85rem);
      background: #eef2fa;
      color: #2c3e50;
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .active-level {
      background: #1f6e43;
      color: white;
      box-shadow: 0 4px 10px rgba(31, 110, 67, 0.3);
    }

    .next-level {
      background: #f3e5ab;
      color: #7a6300;
    }

    .locked-level {
      opacity: 0.6;
      filter: grayscale(0.1);
    }

    #streak-message {
      margin: 14px 0 6px;
      font-weight: 600;
      background: #eef3fc;
      border-radius: 50px;
      padding: 12px;
      text-align: center;
      font-size: clamp(0.85rem, 4vw, 1rem);
    }

    .small-note {
      text-align: center;
      font-size: clamp(0.65rem, 3vw, 0.7rem);
      color: #5f7f95;
      margin-top: 12px;
      line-height: 1.4;
    }

    button {
      cursor: pointer;
      touch-action: manipulation;
    }

    @media (max-width: 640px) {
      body {
        padding: 12px 8px;
      }
      .calendar-card {
        padding: 0.875rem;
      }
      .calendar-dates {
        gap: 4px;
      }
      .day-cell {
        padding: 6px 3px 4px;
        min-height: 55px;
        gap: 4px;
      }
      .level-card {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
        padding: 12px;
      }
      .level-info {
        justify-content: space-between;
        width: 100%;
        flex-wrap: wrap;
      }
      .level-status {
        align-self: flex-start;
        margin-top: 6px;
        width: fit-content;
      }
      .streak-requirement {
        white-space: normal;
        text-align: center;
      }
      .current-streak-badge {
        white-space: normal;
        text-align: center;
        font-size: 0.75rem;
        padding: 4px 10px;
      }
      .streak-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
      }
    }

    @media (max-width: 480px) {
      .calendar-days {
        gap: 2px;
      }
      .calendar-dates {
        gap: 3px;
      }
      .day-cell {
        min-height: 48px;
        border-radius: 10px;
      }
      .day-label {
        font-size: 0.75rem;
      }
      input[type="checkbox"] {
        width: 16px;
        height: 16px;
      }
      .level-icon {
        width: 32px;
        font-size: 1.3rem;
      }
      .level-name {
        font-size: 0.85rem;
      }
      .streak-requirement {
        font-size: 0.65rem;
        padding: 3px 8px;
      }
      .level-status {
        font-size: 0.65rem;
        padding: 4px 10px;
      }
      .level-card {
        padding: 10px;
        margin: 8px 0;
      }
    }

    .active-level-card {
      background: #e2f3e9;
      border-left: 6px solid #2c7da0;
      box-shadow: 0 6px 12px -8px rgba(0,0,0,0.1);
    }
    
    .level-card:hover {
      transform: translateX(6px);
      background: #fefcf5;
    }
    
    @media (max-width: 640px) {
      .level-card:hover {
        transform: none;
      }
      .level-card:active {
        transform: scale(0.98);
      }
    }